Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum
* Changed the license from `BSD-2-Clause` to `BSD-3-Clause` [#2593](https://github.com/IntelPython/dpnp/pull/2593)
* Defined explicit versions range of the Python interpreter which is needed during the build [#2634](https://github.com/IntelPython/dpnp/pull/2634)
* Aligned documentation with NumPy and CuPy style by using short function names [#2633](https://github.com/IntelPython/dpnp/pull/2633)
* Added missing the positional-only and the keyword-only parameter markers to align signature of the ufuncs with NumPy [#2660](https://github.com/IntelPython/dpnp/pull/2660)

### Deprecated

Expand Down
18 changes: 11 additions & 7 deletions dpnp/dpnp_algo/dpnp_elementwise_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ def _call_func(src, dst, sycl_queue, depends=None):
def __call__(
self,
x,
/,
out=None,
*,
where=True,
order="K",
dtype=None,
Expand Down Expand Up @@ -542,7 +544,9 @@ def __call__(
self,
x1,
x2,
/,
out=None,
*,
where=True,
order="K",
dtype=None,
Expand Down Expand Up @@ -746,7 +750,7 @@ def __init__(
mkl_impl_fn=mkl_impl_fn,
)

def __call__(self, x, deg=False, out=None, order="K"):
def __call__(self, x, /, deg=False, *, out=None, order="K"):
res = super().__call__(x, out=out, order=order)
if deg is True:
res *= 180 / dpnp.pi
Expand All @@ -770,7 +774,7 @@ def __init__(
docs,
)

def __call__(self, x, out=None, order="K"):
def __call__(self, x, /, out=None, *, order="K"):
if not dpnp.is_supported_array_type(x):
pass # pass to raise error in main implementation
elif dpnp.issubdtype(x.dtype, dpnp.inexact):
Expand Down Expand Up @@ -816,7 +820,7 @@ def __init__(
mkl_impl_fn=mkl_impl_fn,
)

def __call__(self, x, out=None, order="K"):
def __call__(self, x, /, *, out=None, order="K"):
return super().__call__(x, out=out, order=order)


Expand All @@ -837,7 +841,7 @@ def __init__(
docs,
)

def __call__(self, x, out=None, order="K"):
def __call__(self, x, /, *, out=None, order="K"):
return super().__call__(x, out=out, order=order)


Expand All @@ -858,7 +862,7 @@ def __init__(
docs,
)

def __call__(self, x, out=None, order="K"):
def __call__(self, x, /, *, out=None, order="K"):
if numpy.iscomplexobj(x):
return super().__call__(x, out=out, order=order)
return x
Expand All @@ -885,7 +889,7 @@ def __init__(
mkl_impl_fn=mkl_impl_fn,
)

def __call__(self, x, decimals=0, out=None, dtype=None):
def __call__(self, x, /, decimals=0, out=None, *, dtype=None):
if decimals != 0:
x_usm = dpnp.get_usm_ndarray(x)
out_usm = None if out is None else dpnp.get_usm_ndarray(out)
Expand Down Expand Up @@ -928,7 +932,7 @@ def __init__(
docs,
)

def __call__(self, x, out=None, order="K"):
def __call__(self, x, /, *, out=None, order="K"):
return super().__call__(x, out=out, order=order)


Expand Down
Loading