-
-
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
Fix Matrix on diagonal and triangular matrices for types without zero #36256
Conversation
The failing tests are due to the types
|
Codecov Report
@@ Coverage Diff @@
## master #36256 +/- ##
==========================================
- Coverage 86.10% 86.09% -0.02%
==========================================
Files 349 349
Lines 65163 65163
==========================================
- Hits 56109 56102 -7
- Misses 9054 9061 +7
Continue to review full report at Codecov.
|
I'm a little reluctant about these changes. My gut feeling is that the |
I understand that many parts in |
421f029
to
3fa1f75
Compare
3fa1f75
to
e5c3f3a
Compare
I don't think relying on computations on the type domain is a good practice in Julia. It doesn't compose well because it's rather unavoidable to rely on I do agree exploiting in-place operations on nested mutable data structure would be highly beneficial. But I think the logic has to occur in the value domain rather than in type domain. The only route I can imagine for this to happen is to embrace mutate-or-widen strategy everywhere recursively in LinearAlgebra/Base functions. I'm exploring this in BangBang.jl. It is primary for "containers" but I added a few compute-oriented APIs like I understand that this is not a short-term solution but I think it's something worth keep in mind before using |
Thanks for the link to
In order to write algorithms that work for any type and still exploit mutability when possible, you must be able to apply an operation on some objects and store the result in some other object by mutating it if possible and, in any case, return the result (for instance, with Another example where we could get more features with less effort is matrix multiplication.
So in fact, we could have only one method for |
Codecov Report
@@ Coverage Diff @@
## master #36256 +/- ##
==========================================
- Coverage 86.12% 86.09% -0.04%
==========================================
Files 349 349
Lines 65258 65163 -95
==========================================
- Hits 56205 56102 -103
- Misses 9053 9061 +8
Continue to review full report at Codecov.
|
We have moved the LinearAlgebra stdlib to an external repo: JuliaLang/LinearAlgebra.jl If you think that this PR is still relevant, please open a new PR on the LinearAlgebra.jl repo. |
Similar to #35743