Skip to content

Commit

Permalink
update test_sum.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vtavana committed Dec 20, 2024
1 parent 2bea896 commit 141067b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dpnp/tests/test_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ def test_sum(shape, dtype_in, dtype_out, transpose, keepdims, order):
):
# If summation is zero and dtype=numpy.bool is passed to numpy.sum
# NumPy returns True which is not correct
numpy_res = a_np.sum(axis=axis, keepdims=keepdims)
numpy_res = numpy_res.astype(numpy.bool_)
a = a.astype(dpnp.bool)
dpnp_res = a.sum(axis=axis, dtype=dtype_out, keepdims=keepdims)
else:
numpy_res = a_np.sum(axis=axis, dtype=dtype_out, keepdims=keepdims)
dpnp_res = a.sum(axis=axis, dtype=dtype_out, keepdims=keepdims)
dpnp_res = a.sum(axis=axis, dtype=dtype_out, keepdims=keepdims)
numpy_res = a_np.sum(axis=axis, dtype=dtype_out, keepdims=keepdims)
assert_dtype_allclose(dpnp_res, numpy_res, factor=16)


Expand Down

0 comments on commit 141067b

Please sign in to comment.