Skip to content

Commit 1986a3b

Browse files
committed
address comments
1 parent 019478b commit 1986a3b

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

doc/reference/math.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ Handling complex numbers
169169
dpnp.imag
170170
dpnp.conj
171171
dpnp.conjugate
172+
dpnp.proj
172173

173174

174175
Extrema Finding

doc/reference/ufunc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Math operations
4242
dpnp.log10
4343
dpnp.expm1
4444
dpnp.log1p
45+
dpnp.proj
4546
dpnp.sqrt
4647
dpnp.square
4748
dpnp.reciprocal

dpnp/dpnp_iface_mathematical.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ def proj(
15881588
Returns
15891589
-------
15901590
out : dpnp.ndarray
1591-
The projection of each element of `x`.
1591+
The projection of each element of `x`.
15921592
15931593
Limitations
15941594
-----------
@@ -1600,6 +1600,7 @@ def proj(
16001600
See Also
16011601
--------
16021602
:obj:`dpnp.abs` : Returns the magnitude of a complex number, element-wise.
1603+
:obj:`dpnp.conj` : Return the complex conjugate, element-wise.
16031604
16041605
Examples
16051606
--------
@@ -2053,7 +2054,7 @@ def signbit(
20532054
Returns
20542055
-------
20552056
out : dpnp.ndarray
2056-
A boolean array with indication of the sign of each element of `x`.
2057+
A boolean array with indication of the sign of each element of `x`.
20572058
20582059
Limitations
20592060
-----------
@@ -2072,6 +2073,7 @@ def signbit(
20722073
>>> import dpnp as np
20732074
>>> np.signbit(np.array([-1.2]))
20742075
array([True])
2076+
20752077
>>> np.signbit(np.array([1, -2.3, 2.1]))
20762078
array([False, True, False])
20772079

tests/test_mathematical.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,6 @@ def test_sign_boolean():
449449
ids=["[2, 0, -2]", "[1.1, -1.1]"],
450450
)
451451
@pytest.mark.parametrize("dtype", get_all_dtypes(no_complex=True))
452-
@pytest.mark.usefixtures("allow_fall_back_on_numpy")
453452
def test_signbit(data, dtype):
454453
np_a = numpy.array(data, dtype=dtype)
455454
dpnp_a = dpnp.array(data, dtype=dtype)

tests/test_sycl_queue.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,10 @@ def test_meshgrid(device_x, device_y):
239239
pytest.param("nancumsum", [1.0, dpnp.nan]),
240240
pytest.param("nanprod", [1.0, dpnp.nan]),
241241
pytest.param("nansum", [1.0, dpnp.nan]),
242-
pytest.param("negative", [1.0, -1.0]),
242+
pytest.param("negative", [1.0, 0.0, -1.0]),
243243
pytest.param("prod", [1.0, 2.0]),
244-
pytest.param("sign", [-5.0, 4.5]),
244+
pytest.param("sign", [-5.0, 0.0, 4.5]),
245+
pytest.param("signbit", [-5.0, 0.0, 4.5]),
245246
pytest.param("sqrt", [1.0, 3.0, 9.0]),
246247
pytest.param("sum", [1.0, 2.0]),
247248
pytest.param("trapz", [[0.0, 1.0, 2.0], [3.0, 4.0, 5.0]]),

tests/test_usm_type.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,9 @@ def test_meshgrid(usm_type_x, usm_type_y):
278278
pytest.param("ceil", [-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]),
279279
pytest.param("conjugate", [[1.0 + 1.0j, 0.0], [0.0, 1.0 + 1.0j]]),
280280
pytest.param("floor", [-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]),
281-
pytest.param("negative", [1.0, -1.0]),
282-
pytest.param("sign", [-5.0, 4.5]),
281+
pytest.param("negative", [1.0, 0.0, -1.0]),
282+
pytest.param("sign", [-5.0, 0.0, 4.5]),
283+
pytest.param("signbit", [-5.0, 0.0, 4.5]),
283284
pytest.param("sqrt", [1.0, 3.0, 9.0]),
284285
pytest.param("trunc", [-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0]),
285286
],

0 commit comments

Comments
 (0)