Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix Matplotlib and SciPy deprecations #227

Merged
merged 3 commits into from
Mar 3, 2023

Conversation

EwoutH
Copy link
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
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
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants