-
Notifications
You must be signed in to change notification settings - Fork 62
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
Mv.__pow__ is not returning Mv instance as return value when raise to power of zero #518
Comments
IIUC, this behavior is by design. In such cases, the result should downgrade to scalars naturally, so a Mv is no longer expected. This is also a recurring theme during maintenance, where you could be dealing with a Mv then suddenly you are dealing with a SymPy expression like a This phenomenon is also responsible for the oversight you spot in #513 . So, this is a non-issue for maintenance, though I agree with you on the UX aspect as a user. |
@utensil It sounds like a very weird design choice, I have multiple points to support that is weird:
|
For |
Thanks for fixing this issue 👍 |
Thank you, @mammalwong , the fix should be in master now as #510 is now merged. |
@utensil I have just realized there are another issue related to
Mv.__pow__
, in both primer-updates branch and version 0.5.1:I expect (x**0) returns ga.mv(1) and the .grade property will return [0]. However it raised this exception:
Clearly it is because the method returning sympy.S.One instead of an Mv instance in this case
The text was updated successfully, but these errors were encountered: