-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
scalar + I => scalar #482
Comments
For generic polynomial it needs to be written as Edit: Alternatively, you could write it as |
That's an additional concern, but only for writing very generic polynomial code – for a specific polynomial with positive order, just having |
Oh hey, we already do this: julia> 1 + I
2 |
Fixed by JuliaLang/julia#23923. |
Now that we've deprecated
matrix + scalar
, we can revisit the oldA + I + 1
associativity chesnut. If we makescalar + I => scalar
then we have(A + I) + 1
andA + (I + 1)
both being the same error formatrix + scalar
. This also would allow us to write generic polynomials that work for both scalars and square matrices since e.g.x^2 + 2x + I
would evaluate to a scalar for scalarx
and to a matrix for matrixx
. Strictly this isn't breaking, so this need not be done for 1.0, but we may want to at least try it out to see if there are any things we need to break to make this work.ref #341, cc @eveydee, @dlfivefifty
The text was updated successfully, but these errors were encountered: