diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/_array_api/_array_object.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py index d1aa8d3fb..1410020e2 100644 --- a/numpy/_array_api/_array_object.py +++ b/numpy/_array_api/_array_object.py @@ -215,7 +215,7 @@ class ndarray: """ # Note: This is an error here. if self._array.shape != (): - raise TypeError("bool is only allowed on arrays with shape ()") + raise TypeError("float is only allowed on arrays with shape ()") res = self._array.__float__() return res @@ -372,7 +372,7 @@ class ndarray: """ # Note: This is an error here. if self._array.shape != (): - raise TypeError("bool is only allowed on arrays with shape ()") + raise TypeError("int is only allowed on arrays with shape ()") res = self._array.__int__() return res |