-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ENH: Add linalg.solve_triangular #927
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
dask/array/linalg.py
Outdated
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.
Can we move functions like this outside of the solve_triangular function? Dynamically created functions are expensive to serialize. This is important for distributed computation.
|
How hard would it be to extend this to the case where |
|
Also, in case you're interested in doing even more work, the symmetric version of all of these algorithms is often desired (e.g. |
|
@mrocklin OK, could support "tall-and-skinny matrix". Because |
|
Ah, found that the logic for chunked 2d array is simpler than I thought. Implemented. |
Excellent :) |
|
The point about cholesky was not very related to this PR. Instead it was related to the idea of blocked linear algebra in general. Cholesky is a very useful algorithm for common applications, probably much more useful than |
|
This is a very good algorithm to test "out-of-core", since the memory complexity is going to stay at O(n^2), where n is the dimension of the matrix. This looks good to me, I wish I had dask when I was teaching parallel computing to HPC folks! |
cfd3792 to
e91f4cf
Compare
|
Rebased on #885. |
dask/array/linalg.py
Outdated
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.
Need dtype here as well
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.
I've left because it is likely to be float, but not always. Isn't it the same as other funcs?
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.
Oh, indeed. I should change that. In almost all cases we include the dtype. Some of the downstream libraries, like xray, find this very valuable. I'll fix the other linalg functions.
In test_array_core.py the eq function actually tests that dtype is set.
|
This looks great. Merged. |
Added
solve_triangular, going to use with #885 to implementsolveandinv.