-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
fix matrix multiplication interaction with HermOrSym and Diagonal #22474
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
Conversation
@@ -150,9 +150,9 @@ end | |||
(*)(D::Diagonal, B::AbstractTriangular) = A_mul_B!(D, copy(B)) | |||
|
|||
(*)(A::AbstractMatrix, D::Diagonal) = | |||
scale!(similar(A, promote_op(*, eltype(A), eltype(D.diag))), A, D.diag) | |||
scale!(similar(A, promote_op(*, eltype(A), eltype(D.diag)), size(A)), A, D.diag) |
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.
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.
Seem like this is used elsewhere also, so I think this is OK.
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.
There are some ongoing open API issues between similar vs "copystructure" but for now I think it's okay
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.
lgtm! :)
Thanks for reviewing/merging. |
Fix #19228 (comment)