Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f292bb6
Add a blank line prior Default
antonwolfy Apr 15, 2025
fafb86f
Enable pylink hook
antonwolfy Apr 15, 2025
88c9a2c
Add missing docstrings to methods and attributes
antonwolfy Apr 15, 2025
e0b0868
Add links to missing attriburtes and methods on reference page
antonwolfy Apr 15, 2025
bf1489b
Reorder methods by lexicographical order
antonwolfy May 8, 2025
3ac22b8
Add docstring to a file
antonwolfy May 8, 2025
3eb1ff9
Add inplace ignoring of flake8 warnings
antonwolfy May 8, 2025
ad46975
Fix typos in the docstrings
antonwolfy Jul 21, 2025
ec8d389
Use \text command in math
antonwolfy Jul 21, 2025
53b1a36
Correct link towards operator.index() in docs
antonwolfy Jul 21, 2025
873b6b5
Add description to axis, dtype and out keyword
antonwolfy Jul 22, 2025
8345a05
Add missing :nosignatures:
antonwolfy Jul 22, 2025
3ae8eff
Align signature of methods with numpy.ndarray
antonwolfy Jul 22, 2025
7b59ad6
Update test to pass out as a keyword only argument
antonwolfy Jul 22, 2025
199c4f9
Replace "Returns" word with "Return" in the docstring
antonwolfy Jul 22, 2025
06e9984
Add a page with constants documented and set a proper reference on dp…
antonwolfy Jul 23, 2025
6be05db
Add PR to the changelog
antonwolfy Jul 23, 2025
a571c9a
Apply suggestions from code review
antonwolfy Jul 23, 2025
694b969
Update CHANGELOG.md
antonwolfy Jul 23, 2025
e8127d4
Aligned examples per review comment
antonwolfy Jul 23, 2025
aae481a
Clarify common description of out keyword
antonwolfy Jul 23, 2025
649f01f
Update dpnp/dpnp_array.py
antonwolfy Jul 23, 2025
77b8529
Return NotImplemented when non-default mod is passed to __pow__ and _…
antonwolfy Jul 23, 2025
844d4ed
Merge branch 'master' into update-ndarray-docstrings
vtavana Jul 23, 2025
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
Prev Previous commit
Next Next commit
Fix typos in the docstrings
  • Loading branch information
antonwolfy committed Jul 21, 2025
commit ad469758473a2d544d16796b8ca836080d54e8b0
24 changes: 12 additions & 12 deletions dpnp/dpnp_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def __array_namespace__(self, /, *, api_version=None):

Parameters
----------
api_version : str, optional
api_version : {None, str}, optional
Request namespace compliant with given version of array API. If
``None``, namespace for the most recent supported version is
returned.
Expand Down Expand Up @@ -223,22 +223,22 @@ def __dlpack__(
is not performed.

Default: ``None``.
max_version {tuple of ints, None}, optional
max_version : {tuple of ints, None}, optional
The maximum DLPack version the consumer (caller of ``__dlpack__``)
supports. As ``__dlpack__`` may not always return a DLPack capsule
with version `max_version`, the consumer must verify the version
even if this argument is passed.

Default: ``None``.
dl_device {tuple, None}, optional:
dl_device : {tuple, None}, optional:
The device the returned DLPack capsule will be placed on. The
device must be a 2-tuple matching the format of
``__dlpack_device__`` method, an integer enumerator representing
the device type followed by an integer representing the index of
the device.

Default: ``None``.
copy {bool, None}, optional:
copy : {bool, None}, optional:
Boolean indicating whether or not to copy the input.

* If `copy` is ``True``, the input will always be copied.
Expand All @@ -251,12 +251,12 @@ def __dlpack__(

Raises
------
MemoryError:
MemoryError
when host memory can not be allocated.
DLPackCreationError:
DLPackCreationError
when array is allocated on a partitioned SYCL device, or with
a non-default context.
BufferError:
BufferError
when a copy is deemed necessary but `copy` is ``False`` or when
the provided `dl_device` cannot be handled.

Expand Down Expand Up @@ -325,12 +325,12 @@ def __gt__(self, other):
# '__hash__',

def __iadd__(self, other):
"""Return :math:`self+=value`:math:."""
"""Return :math:`self+=value`."""
dpnp.add(self, other, out=self)
return self

def __iand__(self, other):
"""Return :math:`self&=value`:math:."""
"""Return :math:`self&=value`."""
dpnp.bitwise_and(self, other, out=self)
return self

Expand Down Expand Up @@ -446,7 +446,7 @@ def __lt__(self, other):
return dpnp.less(self, other)

def __matmul__(self, other):
"""Return `:math:self@value`."""
"""Return :math:`self@value`."""
return dpnp.matmul(self, other)

def __mod__(self, other):
Expand Down Expand Up @@ -546,7 +546,7 @@ def __rxor__(self, other):
# '__setattr__',

def __setitem__(self, key, val):
"""Set ``self[key]`` to value."""
"""Set :math:`self[key]` to a value."""
key = _get_unwrapped_index_key(key)

if isinstance(val, dpnp_array):
Expand Down Expand Up @@ -584,7 +584,7 @@ def __truediv__(self, other):
@property
def __usm_ndarray__(self):
"""
Property to support `__usm_ndarray__` protocol.
Property to support ``__usm_ndarray__`` protocol.

It assumes to return :class:`dpctl.tensor.usm_ndarray` instance
corresponding to the content of the object.
Expand Down