diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-01-12 16:30:31 -0700 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-01-12 16:30:31 -0700 |
commit | a78d20a279b3f081367109338c78ab20e08c642c (patch) | |
tree | 6c90aa16fdf7f0e6697cbc1ec81ea79084a65f0f /numpy/_array_api | |
parent | 4bd5d158e66e6b1ca5f1a767738f0674f0dc8095 (diff) | |
download | numpy-a78d20a279b3f081367109338c78ab20e08c642c.tar.gz |
Fix array API functions that need to use np.linalg
Diffstat (limited to 'numpy/_array_api')
-rw-r--r-- | numpy/_array_api/_linear_algebra_functions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/_array_api/_linear_algebra_functions.py b/numpy/_array_api/_linear_algebra_functions.py index ffb589c99..920a86d9b 100644 --- a/numpy/_array_api/_linear_algebra_functions.py +++ b/numpy/_array_api/_linear_algebra_functions.py @@ -8,7 +8,7 @@ def cross(x1, x2, /, *, axis=-1): def det(x, /): # Note: this function is being imported from a nondefault namespace - return np.det(x) + return np.linalg.det(x) def diagonal(x, /, *, axis1=0, axis2=1, offset=0): return np.diagonal(x, axis1=axis1, axis2=axis2, offset=offset) @@ -27,7 +27,7 @@ def diagonal(x, /, *, axis1=0, axis2=1, offset=0): def inv(x): # Note: this function is being imported from a nondefault namespace - return np.inv(x) + return np.linalg.inv(x) # def lstsq(): # return np.lstsq() @@ -46,7 +46,7 @@ def norm(x, /, *, axis=None, keepdims=False, ord=None): # Note: this is different from the default behavior if axis == None and x.ndim > 2: x = x.flatten() - return np.norm(x, axis=axis, keepdims=keepdims, ord=ord) + return np.linalg.norm(x, axis=axis, keepdims=keepdims, ord=ord) def outer(x1, x2, /): return np.outer(x1, x2) |