summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-07-22 16:38:25 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-07-22 16:38:25 -0600
commita16d76388d57f34856803dfef19bacd3a9980b60 (patch)
treec8e7663ab82e529de020ca11b4f941ee7dea48cd /numpy
parent63a9a87360ef492c46c37416b8270563e73a6349 (diff)
downloadnumpy-a16d76388d57f34856803dfef19bacd3a9980b60.tar.gz
Use ValueError instead of TypeError for array API @=
This is consistent with @ and with NumPy.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/_array_api/_array_object.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py
index f6371fbf4..2d999e2f3 100644
--- a/numpy/_array_api/_array_object.py
+++ b/numpy/_array_api/_array_object.py
@@ -741,7 +741,7 @@ class Array:
# of self.
other_shape = other.shape
if self.shape == () or other_shape == ():
- raise TypeError("@= requires at least one dimension")
+ raise ValueError("@= requires at least one dimension")
if len(other_shape) == 1 or other_shape[-1] != other_shape[-2]:
raise ValueError("@= cannot change the shape of the input array")
self._array[:] = self._array.__matmul__(other._array)