From edf68c5bcc0df076af25f65c561350d98c05402f Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Fri, 30 Apr 2021 17:18:01 -0600 Subject: Fix some error messages --- numpy/_array_api/_array_object.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/_array_api') 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 -- cgit v1.2.1