-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Matrix improvements #23724
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
Matrix improvements #23724
Conversation
✅ Hi, I am the SymPy bot (v167). 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.11. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
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) Significantly changed benchmark results (master vs previous release) before after ratio
[77f1d79c] [edf24253]
<sympy-1.10.1^0>
+ 99.3±0.8ms 180±0.5ms 1.81 sum.TimeSum.time_doit
Full benchmark results can be found as artifacts in GitHub Actions |
@@ -179,6 +179,9 @@ def _eval_conjugate(self): | |||
return Adjoint(Transpose(self)) | |||
|
|||
def as_real_imag(self, deep=True, **hints): | |||
return self._eval_as_real_imag() |
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.
Shouldn't this method be deleted?
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.
No, not yet. As _eval_as_real_imag
is not really supported, except for here. But it will simplify things once we support it throughout the code base.
Interesting that the matrices already use _eval_as_real_imag, although it looks like the current implementation in master is wrong (see the We might want to figure out for #23609 in general how we want to handle deprecation. It's hard to just switch from So we need to either deprecate redefining |
Indeed! I was a bit confused about the status at first... Yes, I noted the comment but though that I take the simple way out for now and do not touch anything else.
I guess that ideally, it shouldn't break anything but I can see many cases where it indeed may do it. This is really a case where it would be nice to have code coverage... Right now, I modify things and hope that they are tested so that I do not break anything... |
ae1ee25
to
14cd895
Compare
I'd be a bit tempted to get this in 1.11 as well... But feel free to remove. |
Looks good. |
References to other Issues or PRs
A small step towards #23609 for matrices.
Brief description of what is fixed or changed
Other comments
I should add some tests.
Release Notes
adjoint
,re
, andim
forIdentity
,OneMatrix
, andZeroMatrix
.