summaryrefslogtreecommitdiff
path: root/numpy/_array_api
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/_array_api')
-rw-r--r--numpy/_array_api/_array_object.py4
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