Skip to content

Commit 05c7d77

Browse files
committed
Remove w/a in divide tests for type aligning with numpy
1 parent ee09d7b commit 05c7d77

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

tests/third_party/cupy/math_tests/test_arithmetic.py

-7
Original file line numberDiff line numberDiff line change
@@ -168,13 +168,6 @@ def check_binary(self, xp):
168168
y = y.astype(dtype1)
169169
elif is_array_arg2 and not is_array_arg1:
170170
y = y.astype(dtype2)
171-
elif self.name in ('divide', 'true_divide'):
172-
# If one input is an array of float32 and another - an integer or floating scalar,
173-
# NumPy will return an output array of float32, while DPNP will return the array of float64,
174-
# since NumPy would use the same float64 type when instead of scalar here is array of integer of floating type.
175-
if not (is_array_arg1 and is_array_arg2):
176-
if (is_array_arg1 and arg1.dtype == numpy.float32) ^ (is_array_arg2 and arg2.dtype == numpy.float32):
177-
y = y.astype(numpy.float32)
178171

179172
# NumPy returns different values (nan/inf) on division by zero
180173
# depending on the architecture.

0 commit comments

Comments
 (0)