@@ -151,7 +151,7 @@ def __array_namespace__(self, /, *, api_version=None):
151
151
152
152
Parameters
153
153
----------
154
- api_version : str, optional
154
+ api_version : {None, str} , optional
155
155
Request namespace compliant with given version of array API. If
156
156
``None``, namespace for the most recent supported version is
157
157
returned.
@@ -221,22 +221,22 @@ def __dlpack__(
221
221
is not performed.
222
222
223
223
Default: ``None``.
224
- max_version {tuple of ints, None}, optional
224
+ max_version : {tuple of ints, None}, optional
225
225
The maximum DLPack version the consumer (caller of ``__dlpack__``)
226
226
supports. As ``__dlpack__`` may not always return a DLPack capsule
227
227
with version `max_version`, the consumer must verify the version
228
228
even if this argument is passed.
229
229
230
230
Default: ``None``.
231
- dl_device {tuple, None}, optional:
231
+ dl_device : {tuple, None}, optional:
232
232
The device the returned DLPack capsule will be placed on. The
233
233
device must be a 2-tuple matching the format of
234
234
``__dlpack_device__`` method, an integer enumerator representing
235
235
the device type followed by an integer representing the index of
236
236
the device.
237
237
238
238
Default: ``None``.
239
- copy {bool, None}, optional:
239
+ copy : {bool, None}, optional:
240
240
Boolean indicating whether or not to copy the input.
241
241
242
242
* If `copy` is ``True``, the input will always be copied.
@@ -249,12 +249,12 @@ def __dlpack__(
249
249
250
250
Raises
251
251
------
252
- MemoryError:
252
+ MemoryError
253
253
when host memory can not be allocated.
254
- DLPackCreationError:
254
+ DLPackCreationError
255
255
when array is allocated on a partitioned SYCL device, or with
256
256
a non-default context.
257
- BufferError:
257
+ BufferError
258
258
when a copy is deemed necessary but `copy` is ``False`` or when
259
259
the provided `dl_device` cannot be handled.
260
260
@@ -323,12 +323,12 @@ def __gt__(self, other):
323
323
# '__hash__',
324
324
325
325
def __iadd__ (self , other ):
326
- """Return :math:`self+=value`:math: ."""
326
+ """Return :math:`self+=value`."""
327
327
dpnp .add (self , other , out = self )
328
328
return self
329
329
330
330
def __iand__ (self , other ):
331
- """Return :math:`self&=value`:math: ."""
331
+ """Return :math:`self&=value`."""
332
332
dpnp .bitwise_and (self , other , out = self )
333
333
return self
334
334
@@ -444,7 +444,7 @@ def __lt__(self, other):
444
444
return dpnp .less (self , other )
445
445
446
446
def __matmul__ (self , other ):
447
- """Return ` :math:self@value`."""
447
+ """Return :math:` self@value`."""
448
448
return dpnp .matmul (self , other )
449
449
450
450
def __mod__ (self , other ):
@@ -544,7 +544,7 @@ def __rxor__(self, other):
544
544
# '__setattr__',
545
545
546
546
def __setitem__ (self , key , val ):
547
- """Set `` self[key]`` to value."""
547
+ """Set :math:` self[key]` to a value."""
548
548
key = _get_unwrapped_index_key (key )
549
549
550
550
if isinstance (val , dpnp_array ):
@@ -582,7 +582,7 @@ def __truediv__(self, other):
582
582
@property
583
583
def __usm_ndarray__ (self ):
584
584
"""
585
- Property to support `__usm_ndarray__` protocol.
585
+ Property to support `` __usm_ndarray__` ` protocol.
586
586
587
587
It assumes to return :class:`dpctl.tensor.usm_ndarray` instance
588
588
corresponding to the content of the object.
0 commit comments