-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Replace deprecated np.product by np.prod #2242
fix: Replace deprecated np.product by np.prod #2242
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2242 +/- ##
=======================================
Coverage 98.30% 98.30%
=======================================
Files 69 69
Lines 4533 4533
Branches 802 802
=======================================
Hits 4456 4456
Misses 45 45
Partials 32 32
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alexander-held!
Oh before I merge this I should check to see if this requires us to bump the minimum version of |
This is fine given Line 51 in 951912f
as $ python -c 'import numpy; print(numpy.__version__); print(numpy.product); print(numpy.prod)'
1.17.3
<function product at 0x7ff356be7280>
<function prod at 0x7ff356be2430>
$ 👍 |
I'm going to approve and merge this myself. As always, PRs approved by a single core dev can be reverted as needed by the rest of the dev team. |
* Backport PR #2242 * Use np.prod API over np.product as np.product is deprecated as of NumPy v1.25.0. - c.f. https://numpy.org/devdocs/release/1.25.0-notes.html#deprecations
* Backport PR #2242 * Use np.prod API over np.product as np.product is deprecated as of NumPy v1.25.0. - c.f. https://numpy.org/devdocs/release/1.25.0-notes.html#deprecations Co-authored-by: Alexander Held <45009355+alexander-held@users.noreply.github.com>
Description
Address the upcoming deprecation of
numpy.product
, which results in warnings as ofnumpy
1.25, by switching over tonp.prod
.See https://numpy.org/devdocs/release/1.25.0-notes.html#deprecations:
resolves #2241
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: