Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tests for newly added integr dtypes (int8, int16, uint8-uint64) #2233

Open
wants to merge 12 commits into
base: extended_types_support
Choose a base branch
from
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
vtavana marked this conversation as resolved.
Show resolved Hide resolved
# NumPy returns True which is not correct
vtavana marked this conversation as resolved.
Show resolved Hide resolved
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
Loading