Skip to content

Fix Matplotlib and SciPy deprecations#227

Merged
quaquel merged 3 commits intoquaquel:masterfrom
EwoutH:matplotlib-3.7-depr
Mar 3, 2023
Merged

Fix Matplotlib and SciPy deprecations#227
quaquel merged 3 commits intoquaquel:masterfrom
EwoutH:matplotlib-3.7-depr

Conversation

@EwoutH
Copy link
Copy Markdown
Collaborator

@EwoutH EwoutH commented Feb 28, 2023

Fix two deprecations:

  • Fix matplotlib deprecation in analysis/b_and_w_plotting.py
    Fix MatplotlibDeprecationWarning: The legendHandles attribute was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use legend_handles instead.
  • Fix SciPy deprecation in analysis\scenario_discovery_util.py
    Fix analysis\scenario_discovery_util.py:310: DeprecationWarning: 'binom_test' is deprecated in favour of 'binomtest' from version 1.7.0 and will be removed in Scipy 1.12.0.

Fix MatplotlibDeprecationWarning: The legendHandles attribute was deprecated in Matplotlib 3.7 and will be removed two minor releases later. Use legend_handles instead.
Fix analysis\scenario_discovery_util.py:310: DeprecationWarning: 'binom_test' is deprecated in favour of 'binomtest' from version 1.7.0 and will be removed in Scipy 1.12.0.

See https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.binomtest.html
@EwoutH EwoutH requested a review from quaquel February 28, 2023 09:40
The new binomtest method returns a BinomTestResult instance by default, insead of a p-value binom_test used to do. To get the p-value, it needs to be specifically called from the object.

Advantage is that also over values can be called from the BinomTestResult object if needed.

https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.binomtest.html
Copy link
Copy Markdown
Owner

@quaquel quaquel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@quaquel quaquel merged commit c7db10d into quaquel:master Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants