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