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 13, 2024
1 parent 9d47972 commit fa92990
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 fa92990

Please sign in to comment.