diff --git a/dpnp/dpnp_iface_mathematical.py b/dpnp/dpnp_iface_mathematical.py index 9f9d5dcca08..9c9a8049a14 100644 --- a/dpnp/dpnp_iface_mathematical.py +++ b/dpnp/dpnp_iface_mathematical.py @@ -611,7 +611,7 @@ def around(x, /, decimals=0, out=None): Parameters ---------- x : {dpnp.ndarray, usm_ndarray} - Input array, expected to have a real-valued data type. + Input array, expected to have a boolean or real-valued data type. out : {None, dpnp.ndarray, usm_ndarray}, optional Output array to populate. Array must have the correct shape and the expected data type. @@ -791,6 +791,7 @@ def clip(a, /, min=None, max=None, *, out=None, order="K", **kwargs): conj = conjugate + _COPYSIGN_DOCSTRING = """ Composes a floating-point value with the magnitude of `x1_i` and the sign of `x2_i` for each element of input arrays `x1` and `x2`. @@ -1717,7 +1718,7 @@ def ediff1d(ary, to_end=None, to_begin=None): Parameters ---------- x : {dpnp.ndarray, usm_ndarray} - Input array, expected to have a real-valued data type. + Input array, expected to have a boolean or real-valued data type. out : {None, dpnp.ndarray, usm_ndarray}, optional Output array to populate. Array must have the correct shape and the expected data type. @@ -1878,7 +1879,7 @@ def ediff1d(ary, to_end=None, to_begin=None): Parameters ---------- x : {dpnp.ndarray, usm_ndarray} - Input array, expected to have a real-valued data type. + Input array, expected to have a boolean or real-valued data type. out : {None, dpnp.ndarray, usm_ndarray}, optional Output array to populate. Array must have the correct shape and the expected data type. @@ -4551,7 +4552,7 @@ def trapezoid(y, x=None, dx=1.0, axis=-1): Parameters ---------- x : {dpnp.ndarray, usm_ndarray} - Input array, expected to have a real-valued data type. + Input array, expected to have a boolean or real-valued data type. out : {None, dpnp.ndarray, usm_ndarray}, optional Output array to populate. Array must have the correct shape and the expected data type. diff --git a/dpnp/tests/test_mathematical.py b/dpnp/tests/test_mathematical.py index d594a76df62..7e917b665ee 100644 --- a/dpnp/tests/test_mathematical.py +++ b/dpnp/tests/test_mathematical.py @@ -32,7 +32,6 @@ get_integer_float_dtypes, has_support_aspect16, has_support_aspect64, - is_gpu_device, numpy_version, ) from .third_party.cupy import testing @@ -2178,25 +2177,11 @@ def test_out(self, func, dt_in, dt_out): if dt_in != dt_out: if numpy.can_cast(dt_in, dt_out, casting="same_kind"): # NumPy allows "same_kind" casting, dpnp does not - if ( - func != "fix" - and dt_in == dpnp.bool - and dt_out == dpnp.int8 - and is_gpu_device() - ): - # TODO: get rid of w/a when dpctl#2030 is fixed - pass - else: - assert_raises(ValueError, getattr(dpnp, func), ia, out=iout) + assert_raises(ValueError, getattr(dpnp, func), ia, out=iout) else: assert_raises(ValueError, getattr(dpnp, func), ia, out=iout) assert_raises(TypeError, getattr(numpy, func), a, out=out) else: - if func != "fix" and dt_in == dpnp.bool and is_gpu_device(): - # TODO: get rid of w/a when dpctl#2030 is fixed - out = out.astype(numpy.int8) - iout = iout.astype(dpnp.int8) - expected = getattr(numpy, func)(a, out=out) result = getattr(dpnp, func)(ia, out=iout) assert result is iout @@ -2222,11 +2207,6 @@ def test_out_usm_ndarray(self, func, dt): out = numpy.empty(a.shape, dtype=dt) ia, usm_out = dpnp.array(a), dpt.asarray(out) - if func != "fix" and dt == dpnp.bool and is_gpu_device(): - # TODO: get rid of w/a when dpctl#2030 is fixed - out = out.astype(numpy.int8) - usm_out = dpt.asarray(usm_out, dtype=dpnp.int8) - expected = getattr(numpy, func)(a, out=out) result = getattr(dpnp, func)(ia, out=usm_out) assert result.get_array() is usm_out diff --git a/dpnp/tests/test_umath.py b/dpnp/tests/test_umath.py index 5cc7d5f839b..53a5d8d37bc 100644 --- a/dpnp/tests/test_umath.py +++ b/dpnp/tests/test_umath.py @@ -108,8 +108,6 @@ def test_umaths(test_cases): and is_gpu_device() ): pytest.skip("dpctl-1652") - elif umath in ["ceil", "floor", "trunc"] and args[0].dtype == dpnp.bool: - pytest.skip("dpctl-2030") elif ( umath == "tan" and dpnp.issubdtype(args[0].dtype, dpnp.complexfloating)