Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vtavana committed Aug 25, 2023
1 parent 019478b commit 1986a3b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions doc/reference/math.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Handling complex numbers
dpnp.imag
dpnp.conj
dpnp.conjugate
dpnp.proj


Extrema Finding
Expand Down
1 change: 1 addition & 0 deletions doc/reference/ufunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Math operations
dpnp.log10
dpnp.expm1
dpnp.log1p
dpnp.proj
dpnp.sqrt
dpnp.square
dpnp.reciprocal
Expand Down
6 changes: 4 additions & 2 deletions dpnp/dpnp_iface_mathematical.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,7 +1588,7 @@ def proj(
Returns
-------
out : dpnp.ndarray
The projection of each element of `x`.
The projection of each element of `x`.
Limitations
-----------
Expand All @@ -1600,6 +1600,7 @@ def proj(
See Also
--------
:obj:`dpnp.abs` : Returns the magnitude of a complex number, element-wise.
:obj:`dpnp.conj` : Return the complex conjugate, element-wise.
Examples
--------
Expand Down Expand Up @@ -2053,7 +2054,7 @@ def signbit(
Returns
-------
out : dpnp.ndarray
A boolean array with indication of the sign of each element of `x`.
A boolean array with indication of the sign of each element of `x`.
Limitations
-----------
Expand All @@ -2072,6 +2073,7 @@ def signbit(
>>> import dpnp as np
>>> np.signbit(np.array([-1.2]))
array([True])
>>> np.signbit(np.array([1, -2.3, 2.1]))
array([False, True, False])
Expand Down
1 change: 0 additions & 1 deletion tests/test_mathematical.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ def test_sign_boolean():
ids=["[2, 0, -2]", "[1.1, -1.1]"],
)
@pytest.mark.parametrize("dtype", get_all_dtypes(no_complex=True))
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
def test_signbit(data, dtype):
np_a = numpy.array(data, dtype=dtype)
dpnp_a = dpnp.array(data, dtype=dtype)
Expand Down
5 changes: 3 additions & 2 deletions tests/test_sycl_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,10 @@ def test_meshgrid(device_x, device_y):
pytest.param("nancumsum", [1.0, dpnp.nan]),
pytest.param("nanprod", [1.0, dpnp.nan]),
pytest.param("nansum", [1.0, dpnp.nan]),
pytest.param("negative", [1.0, -1.0]),
pytest.param("negative", [1.0, 0.0, -1.0]),
pytest.param("prod", [1.0, 2.0]),
pytest.param("sign", [-5.0, 4.5]),
pytest.param("sign", [-5.0, 0.0, 4.5]),
pytest.param("signbit", [-5.0, 0.0, 4.5]),
pytest.param("sqrt", [1.0, 3.0, 9.0]),
pytest.param("sum", [1.0, 2.0]),
pytest.param("trapz", [[0.0, 1.0, 2.0], [3.0, 4.0, 5.0]]),
Expand Down
5 changes: 3 additions & 2 deletions tests/test_usm_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,9 @@ def test_meshgrid(usm_type_x, usm_type_y):
pytest.param("ceil", [-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]),
pytest.param("conjugate", [[1.0 + 1.0j, 0.0], [0.0, 1.0 + 1.0j]]),
pytest.param("floor", [-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]),
pytest.param("negative", [1.0, -1.0]),
pytest.param("sign", [-5.0, 4.5]),
pytest.param("negative", [1.0, 0.0, -1.0]),
pytest.param("sign", [-5.0, 0.0, 4.5]),
pytest.param("signbit", [-5.0, 0.0, 4.5]),
pytest.param("sqrt", [1.0, 3.0, 9.0]),
pytest.param("trunc", [-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]),
],
Expand Down

0 comments on commit 1986a3b

Please sign in to comment.