Difference between jax.numpy.linalg.cholesky, jax.scipy.linalg.cholesky & jax.lax.linalg.cholesky #12099
Answered
by
hawkinsp
adam-hartshorne
asked this question in
Q&A
-
What is the difference between these 3 functions? |
Beta Was this translation helpful? Give feedback.
Answered by
hawkinsp
Aug 25, 2022
Replies: 1 comment
-
If you're happy with the NumPy API, I'd pick that one. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
adam-hartshorne
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
jax.lax.linalg.cholesky
: this is JAX's internal cholesky primitive. The other two functions call this internally. We recommend against usinglax
functions if there's ajax.numpy
orjax.scipy
equivalent since the latter two APIs are more stable.jax.numpy.linalg.cholesky
: this API mimicsnumpy.linalg.cholesky
(https://numpy.org/doc/stable/reference/generated/numpy.linalg.cholesky.html) and is implemented usinglax.linalg.cholesky
(https://github.com/google/jax/blob/fd3a72dd1fc1112b698c9f74ee9720d78280e98d/jax/_src/numpy/linalg.py#L43).jax.scipy.linalg.cholesky
: this API mimicsscipy.linalg.cholesky
(https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.cholesky.html) and is a…