Skip to content

Commit e2188ed

Browse files
authored
Align arguments of true_divide with divide (#1641)
1 parent 28d3348 commit e2188ed

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

dpnp/dpnp_iface_mathematical.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ def add(
254254
Otherwise the function will be executed sequentially on CPU.
255255
Input array data types are limited by supported DPNP :ref:`Data types`.
256256
257+
Notes
258+
-----
259+
Equivalent to `x1` + `x2` in terms of array broadcasting.
260+
257261
Examples
258262
--------
259263
>>> import dpnp as np
@@ -784,6 +788,13 @@ def divide(
784788
Otherwise the function will be executed sequentially on CPU.
785789
Input array data types are limited by supported DPNP :ref:`Data types`.
786790
791+
Notes
792+
-----
793+
Equivalent to `x1` / `x2` in terms of array-broadcasting.
794+
795+
The ``true_divide(x1, x2)`` function is an alias for
796+
``divide(x1, x2)``.
797+
787798
Examples
788799
--------
789800
>>> import dpnp as np
@@ -1717,6 +1728,10 @@ def multiply(
17171728
Otherwise the function will be executed sequentially on CPU.
17181729
Input array data types are limited by supported DPNP :ref:`Data types`.
17191730
1731+
Notes
1732+
-----
1733+
Equivalent to `x1` * `x2` in terms of array broadcasting.
1734+
17201735
Examples
17211736
--------
17221737
>>> import dpnp as np
@@ -2685,6 +2700,10 @@ def subtract(
26852700
Otherwise the function will be executed sequentially on CPU.
26862701
Input array data types are limited by supported DPNP :ref:`Data types`.
26872702
2703+
Notes
2704+
-----
2705+
Equivalent to `x1` - `x2` in terms of array broadcasting.
2706+
26882707
Examples
26892708
--------
26902709
>>> import dpnp as np
@@ -2908,23 +2927,7 @@ def trapz(y1, x1=None, dx=1.0, axis=-1):
29082927
return call_origin(numpy.trapz, y1, x1, dx, axis)
29092928

29102929

2911-
def true_divide(*args, **kwargs):
2912-
"""
2913-
Provide a true division of the inputs, element-wise.
2914-
2915-
For full documentation refer to :obj:`numpy.true_divide`.
2916-
2917-
See Also
2918-
--------
2919-
:obj:`dpnp.divide` : Standard division.
2920-
2921-
Notes
2922-
-----
2923-
This function works the same as :obj:`dpnp.divide`.
2924-
2925-
"""
2926-
2927-
return dpnp.divide(*args, **kwargs)
2930+
true_divide = divide
29282931

29292932

29302933
def trunc(

0 commit comments

Comments
 (0)