@@ -121,7 +121,7 @@ def mT(self):
121
121
Raises
122
122
------
123
123
ValueError
124
- If the array is of dimension less than 2 .
124
+ If the array is of dimension less than ``2`` .
125
125
126
126
Examples
127
127
--------
@@ -212,6 +212,7 @@ def __array_namespace__(self, /, *, api_version=None):
212
212
Request namespace compliant with given version of array API. If
213
213
``None``, namespace for the most recent supported version is
214
214
returned.
215
+
215
216
Default: ``None``.
216
217
217
218
Returns
@@ -266,19 +267,22 @@ def __dlpack__(
266
267
stream : {:class:`dpctl.SyclQueue`, None}, optional
267
268
Execution queue to synchronize with. If ``None``, synchronization
268
269
is not performed.
270
+
269
271
Default: ``None``.
270
272
max_version {tuple of ints, None}, optional
271
273
The maximum DLPack version the consumer (caller of ``__dlpack__``)
272
274
supports. As ``__dlpack__`` may not always return a DLPack capsule
273
275
with version `max_version`, the consumer must verify the version
274
276
even if this argument is passed.
277
+
275
278
Default: ``None``.
276
279
dl_device {tuple, None}, optional:
277
280
The device the returned DLPack capsule will be placed on. The
278
281
device must be a 2-tuple matching the format of
279
282
``__dlpack_device__`` method, an integer enumerator representing
280
283
the device type followed by an integer representing the index of
281
284
the device.
285
+
282
286
Default: ``None``.
283
287
copy {bool, None}, optional:
284
288
Boolean indicating whether or not to copy the input.
@@ -648,7 +652,7 @@ def _create_from_usm_ndarray(usm_ary: dpt.usm_ndarray):
648
652
649
653
def all (self , axis = None , out = None , keepdims = False , * , where = True ):
650
654
"""
651
- Returns True if all elements evaluate to True.
655
+ Returns `` True`` if all elements evaluate to `` True.``
652
656
653
657
Refer to :obj:`dpnp.all` for full documentation.
654
658
@@ -664,7 +668,7 @@ def all(self, axis=None, out=None, keepdims=False, *, where=True):
664
668
665
669
def any (self , axis = None , out = None , keepdims = False , * , where = True ):
666
670
"""
667
- Returns True if any of the elements of `a` evaluate to True.
671
+ Returns `` True`` if any of the elements of `a` evaluate to `` True`` .
668
672
669
673
Refer to :obj:`dpnp.any` for full documentation.
670
674
@@ -714,22 +718,26 @@ def argsort(
714
718
Axis along which to sort. If ``None``, the array is flattened
715
719
before sorting. The default is ``-1``, which sorts along the last
716
720
axis.
721
+
717
722
Default: ``-1``.
718
723
kind : {None, "stable", "mergesort", "radixsort"}, optional
719
724
Sorting algorithm. The default is ``None``, which uses parallel
720
725
merge-sort or parallel radix-sort algorithms depending on the array
721
726
data type.
727
+
722
728
Default: ``None``.
723
729
descending : bool, optional
724
730
Sort order. If ``True``, the array must be sorted in descending
725
731
order (by value). If ``False``, the array must be sorted in
726
732
ascending order (by value).
733
+
727
734
Default: ``False``.
728
735
stable : {None, bool}, optional
729
736
Sort stability. If ``True``, the returned array will maintain the
730
737
relative order of `a` values which compare as equal. The same
731
738
behavior applies when set to ``False`` or ``None``.
732
739
Internally, this option selects ``kind="stable"``.
740
+
733
741
Default: ``None``.
734
742
735
743
See Also
@@ -928,6 +936,7 @@ def copy(self, order="C", device=None, usm_type=None, sycl_queue=None):
928
936
----------
929
937
order : {None, "C", "F", "A", "K"}, optional
930
938
Memory layout of the newly output array.
939
+
931
940
Default: ``"C"``.
932
941
device : {None, string, SyclDevice, SyclQueue, Device}, optional
933
942
An array API concept of device where the output array is created.
@@ -940,12 +949,14 @@ def copy(self, order="C", device=None, usm_type=None, sycl_queue=None):
940
949
Default: ``None``.
941
950
usm_type : {None, "device", "shared", "host"}, optional
942
951
The type of SYCL USM allocation for the output array.
952
+
943
953
Default: ``None``.
944
954
sycl_queue : {None, SyclQueue}, optional
945
955
A SYCL queue to use for output array allocation and copying. The
946
956
`sycl_queue` can be passed as ``None`` (the default), which means
947
957
to get the SYCL queue from `device` keyword if present or to use
948
958
a default queue.
959
+
949
960
Default: ``None``.
950
961
951
962
Returns
@@ -1193,6 +1204,7 @@ def imag(self, value):
1193
1204
array([1.+9.j, 3.+9.j, 5.+9.j])
1194
1205
1195
1206
"""
1207
+
1196
1208
if dpnp .issubdtype (self .dtype , dpnp .complexfloating ):
1197
1209
dpnp .copyto (self ._array_obj .imag , value )
1198
1210
else :
@@ -1658,22 +1670,26 @@ def sort(
1658
1670
axis : int, optional
1659
1671
Axis along which to sort. The default is ``-1``, which sorts along
1660
1672
the last axis.
1673
+
1661
1674
Default: ``-1``.
1662
1675
kind : {None, "stable", "mergesort", "radixsort"}, optional
1663
1676
Sorting algorithm. The default is ``None``, which uses parallel
1664
1677
merge-sort or parallel radix-sort algorithms depending on the array
1665
1678
data type.
1679
+
1666
1680
Default: ``None``.
1667
1681
descending : bool, optional
1668
1682
Sort order. If ``True``, the array must be sorted in descending
1669
1683
order (by value). If ``False``, the array must be sorted in
1670
1684
ascending order (by value).
1685
+
1671
1686
Default: ``False``.
1672
1687
stable : {None, bool}, optional
1673
1688
Sort stability. If ``True``, the returned array will maintain the
1674
1689
relative order of `a` values which compare as equal. The same
1675
1690
behavior applies when set to ``False`` or ``None``.
1676
1691
Internally, this option selects ``kind="stable"``.
1692
+
1677
1693
Default: ``None``.
1678
1694
1679
1695
See Also
@@ -1836,6 +1852,7 @@ def to_device(self, device, /, *, stream=None):
1836
1852
stream : {SyclQueue, None}, optional
1837
1853
Execution queue to synchronize with. If ``None``, synchronization
1838
1854
is not performed.
1855
+
1839
1856
Default: ``None``.
1840
1857
1841
1858
Returns
0 commit comments