Skip to content

Commit de71047

Browse files
authored
Update docstrings for ufuncs (#1881)
1 parent fe93c05 commit de71047

File tree

4 files changed

+142
-141
lines changed

4 files changed

+142
-141
lines changed

dpnp/dpnp_iface_bitwise.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@
7070
x2 : {dpnp.ndarray, usm_ndarray}
7171
Second input array, also expected to have integer or boolean data
7272
type.
73-
out : {None, dpnp.ndarray}, optional
73+
out : {None, dpnp.ndarray, usm_ndarray}, optional
7474
Output array to populate.
7575
Array must have the correct shape and the expected data type.
7676
order : {"C", "F", "A", "K"}, optional
7777
Memory layout of the newly output array, if parameter `out` is ``None``.
78-
Default: "K".
78+
Default: ``"K"``.
7979
8080
Returns
8181
-------
@@ -137,12 +137,12 @@
137137
x2 : {dpnp.ndarray, usm_ndarray}
138138
Second input array, also expected to have integer or boolean data
139139
type.
140-
out : {None, dpnp.ndarray}, optional
140+
out : {None, dpnp.ndarray, usm_ndarray}, optional
141141
Output array to populate.
142142
Array must have the correct shape and the expected data type.
143143
order : {"C", "F", "A", "K"}, optional
144144
Memory layout of the newly output array, if parameter `out` is ``None``.
145-
Default: "K".
145+
Default: ``"K"``.
146146
147147
Returns
148148
-------
@@ -199,12 +199,12 @@
199199
x2 : {dpnp.ndarray, usm_ndarray}
200200
Second input array, also expected to have integer or boolean data
201201
type.
202-
out : {None, dpnp.ndarray}, optional
202+
out : {None, dpnp.ndarray, usm_ndarray}, optional
203203
Output array to populate.
204204
Array must have the correct shape and the expected data type.
205205
order : {"C", "F", "A", "K"}, optional
206206
Memory layout of the newly output array, if parameter `out` is ``None``.
207-
Default: "K".
207+
Default: ``"K"``.
208208
209209
Returns
210210
-------
@@ -261,12 +261,12 @@
261261
----------
262262
x : {dpnp.ndarray, usm_ndarray}
263263
Input array, expected to have integer or boolean data type.
264-
out : {None, dpnp.ndarray}, optional
264+
out : {None, dpnp.ndarray, usm_ndarray}, optional
265265
Output array to populate.
266266
Array must have the correct shape and the expected data type.
267267
order : {"C", "F", "A", "K"}, optional
268268
Memory layout of the newly output array, if parameter `out` is ``None``.
269-
Default: "K".
269+
Default: ``"K"``.
270270
271271
Returns
272272
-------
@@ -331,12 +331,12 @@
331331
x2 : {dpnp.ndarray, usm_ndarray}
332332
Second input array, also expected to have integer data type.
333333
Each element must be greater than or equal to 0.
334-
out : {None, dpnp.ndarray}, optional
334+
out : {None, dpnp.ndarray, usm_ndarray}, optional
335335
Output array to populate.
336336
Array must have the correct shape and the expected data type.
337337
order : {"C", "F", "A", "K"}, optional
338338
Memory layout of the newly output array, if parameter `out` is ``None``.
339-
Default: "K".
339+
Default: ``"K"``.
340340
Returns
341341
-------
342342
out : dpnp.ndarray
@@ -389,12 +389,12 @@
389389
x2 : {dpnp.ndarray, usm_ndarray}
390390
Second input array, also expected to have integer data type.
391391
Each element must be greater than or equal to 0.
392-
out : {None, dpnp.ndarray}, optional
392+
out : {None, dpnp.ndarray, usm_ndarray}, optional
393393
Output array to populate.
394394
Array must have the correct shape and the expected data type.
395395
order : {"C", "F", "A", "K"}, optional
396396
Memory layout of the newly output array, if parameter `out` is ``None``.
397-
Default: "K".
397+
Default: ``"K"``.
398398
399399
Returns
400400
-------

dpnp/dpnp_iface_logic.py

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,12 @@ def any(x, /, axis=None, out=None, keepdims=False, *, where=True):
317317
First input array, expected to have numeric data type.
318318
x2 : {dpnp.ndarray, usm_ndarray}
319319
Second input array, also expected to have numeric data type.
320-
out : {None, dpnp.ndarray}, optional
320+
out : {None, dpnp.ndarray, usm_ndarray}, optional
321321
Output array to populate.
322322
Array have the correct shape and the expected data type.
323323
order : {"C", "F", "A", "K"}, optional
324324
Memory layout of the newly output array, if parameter `out` is ``None``.
325-
Default: "K".
325+
Default: ``"K"``.
326326
327327
Returns
328328
-------
@@ -386,12 +386,12 @@ def any(x, /, axis=None, out=None, keepdims=False, *, where=True):
386386
First input array, expected to have numeric data type.
387387
x2 : {dpnp.ndarray, usm_ndarray}
388388
Second input array, also expected to have numeric data type.
389-
out : {None, dpnp.ndarray}, optional
389+
out : {None, dpnp.ndarray, usm_ndarray}, optional
390390
Output array to populate.
391391
Array must have the correct shape and the expected data type.
392392
order : {"C", "F", "A", "K"}, optional
393393
Memory layout of the newly output array, if parameter `out` is ``None``.
394-
Default: "K".
394+
Default: ``"K"``.
395395
396396
Returns
397397
-------
@@ -449,12 +449,12 @@ def any(x, /, axis=None, out=None, keepdims=False, *, where=True):
449449
First input array, expected to have numeric data type.
450450
x2 : {dpnp.ndarray, usm_ndarray}
451451
Second input array, also expected to have numeric data type.
452-
out : {None, dpnp.ndarray}, optional
452+
out : {None, dpnp.ndarray, usm_ndarray}, optional
453453
Output array to populate.
454454
Array must have the correct shape and the expected data type.
455455
order : {"C", "F", "A", "K"}, optional
456456
Memory layout of the newly output array, if parameter `out` is ``None``.
457-
Default: "K".
457+
Default: ``"K"``.
458458
459459
Returns
460460
-------
@@ -553,12 +553,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
553553
----------
554554
x : {dpnp.ndarray, usm_ndarray}
555555
Input array, expected to have numeric data type.
556-
out : {None, dpnp.ndarray}, optional
556+
out : {None, dpnp.ndarray, usm_ndarray}, optional
557557
Output array to populate.
558558
Array must have the correct shape and the expected data type.
559559
order : {"C", "F", "A", "K"}, optional
560560
Memory layout of the newly output array, if parameter `out` is ``None``.
561-
Default: "K".
561+
Default: ``"K"``.
562562
563563
Returns
564564
-------
@@ -612,12 +612,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
612612
----------
613613
x : {dpnp.ndarray, usm_ndarray}
614614
Input array, expected to have numeric data type.
615-
out : {None, dpnp.ndarray}, optional
615+
out : {None, dpnp.ndarray, usm_ndarray}, optional
616616
Output array to populate.
617617
Array must have the correct shape and the expected data type.
618618
order : {"C", "F", "A", "K"}, optional
619619
Memory layout of the newly output array, if parameter `out` is ``None``.
620-
Default: "K".
620+
Default: ``"K"``.
621621
622622
Returns
623623
-------
@@ -665,12 +665,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
665665
----------
666666
x : {dpnp.ndarray, usm_ndarray}
667667
Input array, expected to have numeric data type.
668-
out : {None, dpnp.ndarray}, optional
668+
out : {None, dpnp.ndarray, usm_ndarray}, optional
669669
Output array to populate.
670670
Array must have the correct shape and the expected data type.
671671
order : {"C", "F", "A", "K"}, optional
672672
Memory layout of the newly output array, if parameter `out` is ``None``.
673-
Default: "K".
673+
Default: ``"K"``.
674674
675675
Returns
676676
-------
@@ -722,12 +722,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
722722
First input array, expected to have numeric data type.
723723
x2 : {dpnp.ndarray, usm_ndarray}
724724
Second input array, also expected to have numeric data type.
725-
out : {None, dpnp.ndarray}, optional
725+
out : {None, dpnp.ndarray, usm_ndarray}, optional
726726
Output array to populate.
727727
Array must have the correct shape and the expected data type.
728728
order : {"C", "F", "A", "K"}, optional
729729
Memory layout of the newly output array, if parameter `out` is ``None``.
730-
Default: "K".
730+
Default: ``"K"``.
731731
732732
Returns
733733
-------
@@ -739,6 +739,7 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
739739
-----------
740740
Parameters `where` and `subok` are supported with their default values.
741741
Otherwise ``NotImplementedError`` exception will be raised.
742+
742743
See Also
743744
--------
744745
:obj:`dpnp.greater` : Return the truth value of (x1 > x2) element-wise.
@@ -784,12 +785,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
784785
First input array, expected to have numeric data type.
785786
x2 : {dpnp.ndarray, usm_ndarray}
786787
Second input array, also expected to have numeric data type.
787-
out : {None, dpnp.ndarray}, optional
788+
out : {None, dpnp.ndarray, usm_ndarray}, optional
788789
Output array to populate.
789790
Array must have the correct shape and the expected data type.
790791
order : {"C", "F", "A", "K"}, optional
791792
Memory layout of the newly output array, if parameter `out` is ``None``.
792-
Default: "K".
793+
Default: ``"K"``.
793794
794795
Returns
795796
-------
@@ -847,12 +848,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
847848
First input array.
848849
x2 : {dpnp.ndarray, usm_ndarray}
849850
Second input array.
850-
out : {None, dpnp.ndarray}, optional
851+
out : {None, dpnp.ndarray, usm_ndarray}, optional
851852
Output array to populate.
852853
Array must have the correct shape and the expected data type.
853854
order : {"C", "F", "A", "K"}, optional
854855
Memory layout of the newly output array, if parameter `out` is ``None``.
855-
Default: "K".
856+
Default: ``"K"``.
856857
857858
Returns
858859
-------
@@ -909,12 +910,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
909910
----------
910911
x : {dpnp.ndarray, usm_ndarray}
911912
Input array.
912-
out : {None, dpnp.ndarray}, optional
913+
out : {None, dpnp.ndarray, usm_ndarray}, optional
913914
Output array to populate.
914915
Array must have the correct shape and the expected data type.
915916
order : {"C", "F", "A", "K"}, optional
916917
Memory layout of the newly output array, if parameter `out` is ``None``.
917-
Default: "K".
918+
Default: ``"K"``.
918919
919920
Returns
920921
-------
@@ -964,12 +965,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
964965
First input array.
965966
x2 : {dpnp.ndarray, usm_ndarray}
966967
Second input array.
967-
out : {None, dpnp.ndarray}, optional
968+
out : {None, dpnp.ndarray, usm_ndarray}, optional
968969
Output array to populate.
969970
Array must have the correct shape and the expected data type.
970971
order : {"C", "F", "A", "K"}, optional
971972
Memory layout of the newly output array, if parameter `out` is ``None``.
972-
Default: "K".
973+
Default: ``"K"``.
973974
974975
Returns
975976
-------
@@ -1029,12 +1030,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
10291030
First input array.
10301031
x2 : {dpnp.ndarray, usm_ndarray}
10311032
Second input array.
1032-
out : {None, dpnp.ndarray}, optional
1033+
out : {None, dpnp.ndarray, usm_ndarray}, optional
10331034
Output array to populate.
10341035
Array must have the correct shape and the expected data type.
10351036
order : {"C", "F", "A", "K"}, optional
10361037
Memory layout of the newly output array, if parameter `out` is ``None``.
1037-
Default: "K".
1038+
Default: ``"K"``.
10381039
10391040
Returns
10401041
-------
@@ -1092,12 +1093,12 @@ def isclose(x1, x2, rtol=1e-05, atol=1e-08, equal_nan=False):
10921093
First input array, expected to have numeric data type.
10931094
x2 : {dpnp.ndarray, usm_ndarray}
10941095
Second input array, also expected to have numeric data type.
1095-
out : {None, dpnp.ndarray}, optional
1096+
out : {None, dpnp.ndarray, usm_ndarray}, optional
10961097
Output array to populate.
10971098
Array must have the correct shape and the expected data type.
10981099
order : {"C", "F", "A", "K"}, optional
10991100
Memory layout of the newly output array, if parameter `out` is ``None``.
1100-
Default: "K".
1101+
Default: ``"K"``.
11011102
11021103
Returns
11031104
-------

0 commit comments

Comments
 (0)