Skip to content

Commit

Permalink
fix: Update to adjust for new scipy.stats.mode behavior.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
feanil committed May 17, 2024
1 parent 2ae6fba commit 8fb41a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cms/djangoapps/contentstore/api/views/course_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
)

0 comments on commit 8fb41a9

Please sign in to comment.