-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Backport: Fix the _array_ methods to avoid deprecation warnings #26456
Conversation
def __array__(self, dtype=object, copy=None): if copy is not None and not copy: raise TypeError("Cannot implement copy=False when converting Matrix to ndarray")
Currently copy=False is commented out due to a bug in numpy. see: numpy/numpy#25941 (comment)
also, fixed a little bug in test_matexpr which was causing the test to fail on master.
✅ Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.12.1. Click here to see the pull request description that was parsed.
|
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) · Did not find results for commit upstream/master
Significantly changed benchmark results (master vs previous release) before after ratio
[41d90958] [40e55587]
<sympy-1.11.1^0>
- 762±3μs 468±2μs 0.61 solve.TimeSparseSystem.time_linear_eq_to_matrix(10)
- 2.14±0ms 872±4μs 0.41 solve.TimeSparseSystem.time_linear_eq_to_matrix(20)
- 4.25±0.01ms 1.28±0.01ms 0.30 solve.TimeSparseSystem.time_linear_eq_to_matrix(30)
Full benchmark results can be found as artifacts in GitHub Actions |
🚨🚨🚨ERROR🚨🚨🚨 There was an error automatically updating the release notes. Normally it should not have been possible to merge this pull request. You might want to open an issue about this at https://github.com/sympy/sympy-bot/issues. In the meantime, you will need to update the release notes on the wiki manually. The error message was: Not all changelog entries were added. Make sure there is a header called |
References to other Issues or PRs
Backport of gh-26442
Brief description of what is fixed or changed
Other comments
Release Notes
Matrix.__array__
method now takes a copy argument since not doing so it deprecated in NumPy 2.0.