From ff4d084e8b32b1e55f2534ad64357127908f463b 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 297a530d76..42489978b8 100644 --- a/cms/djangoapps/contentstore/api/views/course_quality.py +++ b/cms/djangoapps/contentstore/api/views/course_quality.py @@ -272,5 +272,5 @@ class CourseQualityView(DeveloperErrorViewMixin, GenericAPIView): 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], )