Skip to content

Commit ed84f7a

Browse files
committed
Changes to choose docstring
Fix spacing in choices type list Fix spacing in example arrays
1 parent 9e39ab7 commit ed84f7a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dpnp/dpnp_iface_indexing.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ def choose(a, choices, out=None, mode="wrap"):
193193
in `choices` to choose from. Behavior of out-of-bounds integers (i.e.,
194194
integers outside of `[0, n-1]` where `n` is the number of choices) is
195195
determined by the `mode` keyword.
196-
choices : {dpnp.ndarray, usm_ndarray, sequence of dpnp.ndarrays and
197-
usm_ndarrays}
196+
choices : {dpnp.ndarray, usm_ndarray,
197+
sequence of dpnp.ndarrays and usm_ndarrays}
198198
Choice arrays. `a` and choice arrays must be broadcast-compatible.
199199
If `choices` is an array, the array is unstacked into a sequence of
200200
arrays.
@@ -233,20 +233,20 @@ def choose(a, choices, out=None, mode="wrap"):
233233
... # will be the second element of the fourth (3+1) choice array, i.e.,
234234
... # 31, etc.
235235
... )
236-
array([20, 31, 12, 3])
236+
array([20, 31, 12, 3])
237237
>>> np.choose(np.array([2, 4, 1, 0]), choices, mode='clip'
238238
... # 4 goes to 3 (4-1)
239239
... )
240-
array([20, 31, 12, 3])
240+
array([20, 31, 12, 3])
241241
>>> # because there are 4 choice arrays
242242
>>> np.choose(np.array([2, 4, 1, 0]), choices, mode='wrap'
243243
... # 4 is clipped to 3
244244
... )
245-
array([20, 31, 12, 3])
245+
array([20, 31, 12, 3])
246246
>>> np.choose(np.array([2, -1, 1, 0]), choices, mode='wrap'
247247
... # -1 goes to 3 (-1+4)
248248
... )
249-
array([20, 31, 12, 3])
249+
array([20, 31, 12, 3])
250250
251251
An example using broadcasting:
252252

0 commit comments

Comments
 (0)