diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2021-07-22 16:38:25 -0600 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2021-07-22 16:38:25 -0600 |
commit | a16d76388d57f34856803dfef19bacd3a9980b60 (patch) | |
tree | c8e7663ab82e529de020ca11b4f941ee7dea48cd /numpy/_array_api/_array_object.py | |
parent | 63a9a87360ef492c46c37416b8270563e73a6349 (diff) | |
download | numpy-a16d76388d57f34856803dfef19bacd3a9980b60.tar.gz |
Use ValueError instead of TypeError for array API @=
This is consistent with @ and with NumPy.
Diffstat (limited to 'numpy/_array_api/_array_object.py')
-rw-r--r-- | numpy/_array_api/_array_object.py | 2 |
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) |