-
Notifications
You must be signed in to change notification settings - Fork 54
Add Cholesky function specification #110
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
|
It is straightforward for CuPy to support the |
0607525 to
138e963
Compare
|
Thanks, @leofang, for the review. This is ready for merge... |
|
What was the motivation for choosing the |
|
@lucascolley See the API comparison linked to in the OP: https://github.com/data-apis/array-api-comparison/blob/0459e5dd51fa38df8bf24363f4fa5895ac5c2929/signatures/linalg/cholesky.md TL;DR: the kwarg was not universally supported. Among array libraries, PyTorch had |
This PR
Notes
NumPy (along with CuPy, JAX, MXNet, TF) does not allow returning either the lower- or upper-triangular Cholesky factor. However, SciPy, Torch, and Dask do support returning either. The ability to return either factor is common outside of the PyData ecosystem (MATLAB, LAPACK). Accordingly, the decision was made to include an
upperkeyword to support returning the upper-triangular Cholesky factor.Following Torch, MXNet, TF, NumPy, and JAX, this proposal allows for providing a stack of square matrices.