Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align arguments of dpnp.true_divide with dpnp.divide #1641

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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