From fa92990bfeaec5e0060ef56387a5aa6f99cf8c5c Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Mon, 13 May 2024 11:16:36 -0400 Subject: [PATCH] fix: Update to adjust for new scipy.stats.mode behavior. Previously the default for the `keepdims` parameter was True, but as of SciPy 1.11.0 it is false. This is actually the behavior we want here since we only care about the mode value and not other values. https://docs.scipy.org/doc/scipy/release/1.11.0-notes.html#expired-deprecations --- cms/djangoapps/contentstore/api/views/course_quality.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/djangoapps/contentstore/api/views/course_quality.py b/cms/djangoapps/contentstore/api/views/course_quality.py index 297a530d76be..42489978b857 100644 --- a/cms/djangoapps/contentstore/api/views/course_quality.py +++ b/cms/djangoapps/contentstore/api/views/course_quality.py @@ -272,5 +272,5 @@ def _stats_dict(self, data): # lint-amnesty, pylint: disable=missing-function-d max=max(data), mean=np.around(np.mean(data)), median=np.around(np.median(data)), - mode=stats.mode(data, axis=None)[0][0], + mode=stats.mode(data, axis=None)[0], )