summaryrefslogtreecommitdiff
path: root/numpy/_array_api/linear_algebra_functions.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/_array_api/linear_algebra_functions.py')
-rw-r--r--numpy/_array_api/linear_algebra_functions.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/_array_api/linear_algebra_functions.py b/numpy/_array_api/linear_algebra_functions.py
index 9995e6b98..820dfffba 100644
--- a/numpy/_array_api/linear_algebra_functions.py
+++ b/numpy/_array_api/linear_algebra_functions.py
@@ -55,6 +55,9 @@ def inv(x):
def norm(x, /, *, axis=None, keepdims=False, ord=None):
# Note: this function is being imported from a nondefault namespace
from ..linalg import norm
+ # Note: this is different from the default behavior
+ if axis == None and x.ndim > 2:
+ x = x.flatten()
return norm(x, axis=axis, keepdims=keepdims, ord=ord)
def outer(x1, x2, /):