summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/_array_api/_array_object.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/numpy/_array_api/_array_object.py b/numpy/_array_api/_array_object.py
index 505c27839..98e2f78f9 100644
--- a/numpy/_array_api/_array_object.py
+++ b/numpy/_array_api/_array_object.py
@@ -382,8 +382,6 @@ class Array:
other = self._check_allowed_dtypes(other, 'all', '__eq__')
if other is NotImplemented:
return other
- if isinstance(other, (int, float, bool)):
- other = self._promote_scalar(other)
self, other = self._normalize_two_args(self, other)
res = self._array.__eq__(other._array)
return self.__class__._new(res)
@@ -542,8 +540,6 @@ class Array:
other = self._check_allowed_dtypes(other, 'all', '__ne__')
if other is NotImplemented:
return other
- if isinstance(other, (int, float, bool)):
- other = self._promote_scalar(other)
self, other = self._normalize_two_args(self, other)
res = self._array.__ne__(other._array)
return self.__class__._new(res)