diff options
| author | Aaron Meurer <asmeurer@gmail.com> | 2021-05-10 15:07:36 -0600 |
|---|---|---|
| committer | Aaron Meurer <asmeurer@gmail.com> | 2021-05-10 15:07:36 -0600 |
| commit | 219968727b6a28e8564a22284cb630a808bc0c04 (patch) | |
| tree | 4b83f620ed1e990f5cee5577bbb03730046e0e50 /numpy/_array_api | |
| parent | edf68c5bcc0df076af25f65c561350d98c05402f (diff) | |
| download | numpy-219968727b6a28e8564a22284cb630a808bc0c04.tar.gz | |
Fix the array API norm() function
Diffstat (limited to 'numpy/_array_api')
| -rw-r--r-- | numpy/_array_api/_linear_algebra_functions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/_array_api/_linear_algebra_functions.py b/numpy/_array_api/_linear_algebra_functions.py index f57fe292a..99a386866 100644 --- a/numpy/_array_api/_linear_algebra_functions.py +++ b/numpy/_array_api/_linear_algebra_functions.py @@ -122,7 +122,7 @@ def norm(x: array, /, *, axis: Optional[Union[int, Tuple[int, int]]] = None, kee """ # Note: this is different from the default behavior if axis == None and x.ndim > 2: - x = x.flatten() + x = ndarray._new(x._array.flatten()) # Note: this function is being imported from a nondefault namespace return ndarray._new(np.linalg.norm(x._array, axis=axis, keepdims=keepdims, ord=ord)) |
