summaryrefslogtreecommitdiff
path: root/numpy/_array_api/_array_object.py
diff options
context:
space:
mode:
authorAaron Meurer <asmeurer@gmail.com>2021-04-30 17:18:01 -0600
committerAaron Meurer <asmeurer@gmail.com>2021-04-30 17:18:01 -0600
commitedf68c5bcc0df076af25f65c561350d98c05402f (patch)
treedf2568336a13becb58ca355a73fdf311211b32ea /numpy/_array_api/_array_object.py
parent6115cce356868d4b62ac25fc6777e3bdd0a7eb57 (diff)
downloadnumpy-edf68c5bcc0df076af25f65c561350d98c05402f.tar.gz
Fix some error messages
Diffstat (limited to 'numpy/_array_api/_array_object.py')
-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