Skip test of sub for bool
@@ -372,11 +372,14 @@ class TestArrayElementwiseOp(unittest.TestCase):
@testing.for_all_dtypes_combination(names=['x_type', 'y_type'])
@testing.numpy_cupy_allclose()
def check_array_doubly_broadcasted_op(self, op, xp, x_type, y_type,
- no_complex=False):
+ no_complex=False, no_bool=False):
if no_complex:
if numpy.dtype(x_type).kind == 'c' \
or numpy.dtype(y_type).kind == 'c':
return x_type(True)
+ if (no_bool and
+ (numpy.dtype(x_type) == '?' or numpy.dtype(y_type) == '?')):
+ return x_type(True)
a = xp.array([[[1, 2, 3]], [[4, 5, 6]]], x_type)
b = xp.array([[1], [2], [3]], y_type)
return op(a, b)
@@ -385,7 +388,7 @@ class TestArrayElementwiseOp(unittest.TestCase):
self.check_array_doubly_broadcasted_op(operator.add)
def test_doubly_broadcasted_sub(self):
- self.check_array_doubly_broadcasted_op(operator.sub)
+ self.check_array_doubly_broadcasted_op(operator.sub, no_bool=True)
def test_doubly_broadcasted_mul(self):
self.check_array_doubly_broadcasted_op(operator.mul)
