BUG: array_api: linalg.cholesky
returns the conjugate of the expected upper decomposition
#24451
Milestone
linalg.cholesky
returns the conjugate of the expected upper decomposition
#24451
Describe the issue:
I expect
numpy.array_api.linalg.cholesky(a, upper=True)
to return the same array asscipy.linalg.cholesky(a, lower=False)
, the upper Cholesky decomposition ofa
. Instead, it returns the conjugate.There is a possibility that this is a bug on
scipy:main
, but I assume that it is here instead. I can't check withnp.linalg.cholesky
since that only provides lower Cholesky decompositions.xp.linalg.cholesky
: https://data-apis.org/array-api/latest/extensions/generated/array_api.linalg.cholesky.html#array_api.linalg.choleskyscipy.linalg.cholesky
: https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.cholesky.html#scipy.linalg.choleskyMaybe a conjugation should be included on this line?:
numpy/numpy/array_api/linalg.py
Line 56 in 2ce972e
Reproduce the code example:
Error message:
No response
Runtime information:
import sys, numpy; print(numpy.__version__); print(sys.version)
:print(numpy.show_runtime())
:Context for the issue:
I am working on array API support in
scipy.linalg
. This is failing tests over there fornumpy.array_api
arrays.The text was updated successfully, but these errors were encountered: