Skip to content

Commit

Permalink
Align arguments of true_divide with divide (#1641)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy authored Dec 12, 2023
1 parent 28d3348 commit e2188ed
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions dpnp/dpnp_iface_mathematical.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ def add(
Otherwise the function will be executed sequentially on CPU.
Input array data types are limited by supported DPNP :ref:`Data types`.
Notes
-----
Equivalent to `x1` + `x2` in terms of array broadcasting.
Examples
--------
>>> import dpnp as np
Expand Down Expand Up @@ -784,6 +788,13 @@ def divide(
Otherwise the function will be executed sequentially on CPU.
Input array data types are limited by supported DPNP :ref:`Data types`.
Notes
-----
Equivalent to `x1` / `x2` in terms of array-broadcasting.
The ``true_divide(x1, x2)`` function is an alias for
``divide(x1, x2)``.
Examples
--------
>>> import dpnp as np
Expand Down Expand Up @@ -1717,6 +1728,10 @@ def multiply(
Otherwise the function will be executed sequentially on CPU.
Input array data types are limited by supported DPNP :ref:`Data types`.
Notes
-----
Equivalent to `x1` * `x2` in terms of array broadcasting.
Examples
--------
>>> import dpnp as np
Expand Down Expand Up @@ -2685,6 +2700,10 @@ def subtract(
Otherwise the function will be executed sequentially on CPU.
Input array data types are limited by supported DPNP :ref:`Data types`.
Notes
-----
Equivalent to `x1` - `x2` in terms of array broadcasting.
Examples
--------
>>> import dpnp as np
Expand Down Expand Up @@ -2908,23 +2927,7 @@ def trapz(y1, x1=None, dx=1.0, axis=-1):
return call_origin(numpy.trapz, y1, x1, dx, axis)


def true_divide(*args, **kwargs):
"""
Provide a true division of the inputs, element-wise.
For full documentation refer to :obj:`numpy.true_divide`.
See Also
--------
:obj:`dpnp.divide` : Standard division.
Notes
-----
This function works the same as :obj:`dpnp.divide`.
"""

return dpnp.divide(*args, **kwargs)
true_divide = divide


def trunc(
Expand Down

0 comments on commit e2188ed

Please sign in to comment.