Skip to content

Commit d0dad9b

Browse files
committed
Add synchronization warning to nanargmin and nanargmax documentation
1 parent 4552fe8 commit d0dad9b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

dpnp/dpnp_iface_nanfunctions.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ def nanargmax(a, axis=None, out=None, *, keepdims=False):
137137
138138
For full documentation refer to :obj:`numpy.nanargmax`.
139139
140+
Warning
141+
-------
142+
This function synchronizes in order to test for all-NaN slices in the array.
143+
This may harm performance in some applications. To avoid synchronization,
144+
the user is recommended to filter NaNs themselves and use `dpnp.argmax`
145+
on the filtered array.
146+
140147
Parameters
141148
----------
142149
a : {dpnp.ndarray, usm_ndarray}
@@ -181,7 +188,7 @@ def nanargmax(a, axis=None, out=None, *, keepdims=False):
181188
axis, ignoring NaNs.
182189
:obj:`dpnp.argmax` : Returns the indices of the maximum values along
183190
an axis.
184-
191+
185192
Examples
186193
--------
187194
>>> import dpnp as np
@@ -211,6 +218,13 @@ def nanargmin(a, axis=None, out=None, *, keepdims=False):
211218
212219
For full documentation refer to :obj:`numpy.nanargmin`.
213220
221+
Warning
222+
-------
223+
This function synchronizes in order to test for all-NaN slices in the array.
224+
This may harm performance in some applications. To avoid synchronization,
225+
the user is recommended to filter NaNs themselves and use `dpnp.argmax`
226+
on the filtered array.
227+
214228
Parameters
215229
----------
216230
a : {dpnp.ndarray, usm_ndarray}

0 commit comments

Comments
 (0)