Skip to content

Commit 99f94c6

Browse files
committed
update test_sum_empty_axis
1 parent 6635c36 commit 99f94c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/third_party/cupy/math_tests/test_sumprod.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ def test_sum_axes4(self, xp, dtype):
181181
@testing.numpy_cupy_allclose()
182182
def test_sum_empty_axis(self, xp, dtype):
183183
a = testing.shaped_arange((2, 3, 4, 5), xp, dtype)
184-
return a.sum(axis=())
184+
if xp is numpy and dtype == numpy.float32 and has_support_aspect64():
185+
dtype = numpy.float64
186+
return a.sum(axis=(), dtype=dtype)
187+
else:
188+
return a.sum(axis=())
185189

186190
@testing.for_all_dtypes_combination(names=["src_dtype", "dst_dtype"])
187191
@testing.numpy_cupy_allclose()

0 commit comments

Comments
 (0)