diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-01-11 16:43:51 -0700 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2021-01-11 17:03:23 -0700 |
| commit | e00760ccbfdbefea1625f5407e94397f2c85e848 (patch) | |
| tree | dc70e101c64ac1a9d278107b2dd6d37efcf3aa7f /numpy/_array_api/linear_algebra_functions.py | |
| parent | 9934cf3abcd6ba9438c340042e94f8343e3f3d13 (diff) | |
| download | numpy-e00760ccbfdbefea1625f5407e94397f2c85e848.tar.gz | |
Fix array API functions that are named differently or not in the default numpy namespace
Diffstat (limited to 'numpy/_array_api/linear_algebra_functions.py')
| -rw-r--r-- | numpy/_array_api/linear_algebra_functions.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/numpy/_array_api/linear_algebra_functions.py b/numpy/_array_api/linear_algebra_functions.py index 5da7ac17b..9995e6b98 100644 --- a/numpy/_array_api/linear_algebra_functions.py +++ b/numpy/_array_api/linear_algebra_functions.py @@ -7,7 +7,8 @@ def cross(x1, x2, /, *, axis=-1): return cross(x1, x2, axis=axis) def det(x, /): - from .. import det + # Note: this function is being imported from a nondefault namespace + from ..linalg import det return det(x) def diagonal(x, /, *, axis1=0, axis2=1, offset=0): @@ -31,7 +32,8 @@ def diagonal(x, /, *, axis1=0, axis2=1, offset=0): # return einsum() def inv(x): - from .. import inv + # Note: this function is being imported from a nondefault namespace + from ..linalg import inv return inv(x) # def lstsq(): @@ -51,7 +53,8 @@ def inv(x): # return matrix_rank() def norm(x, /, *, axis=None, keepdims=False, ord=None): - from .. import norm + # Note: this function is being imported from a nondefault namespace + from ..linalg import norm return norm(x, axis=axis, keepdims=keepdims, ord=ord) def outer(x1, x2, /): |
