-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make Matrix
cntr work for structured matrices for zero(T) !isa T
#44707
Conversation
@nanosoldier |
Thanks! You can find here a list of assumptions commonly made and types for which it doesn't hold: jump-dev/MutableArithmetics.jl#47 |
Aha, I realize you made a more complete proposal in #36256. Currently, none of the |
Your package evaluation job has completed - no new issues were detected. A full report can be found here. |
Co-authored-by: Oscar Dowson <odow@users.noreply.github.com>
This fixes #44615 (comment). At the same time, it extends the
Matrix
constructors to other structured matrices whose eltypeT
has the property!isa(zero(T), T)
. Before #44615,Matrix(::Diagonal)
was defined in terms ofdiagm
, which handled the eltype promotion correctly.Matrix(::BiTriSym)
, however, was defined manually without correctly handling type promotion.Fixes jump-dev/JuMP.jl#2930.