Skip to content

Commit 8d78920

Browse files
committed
Change nanargmin and nanargmax docstring warnings
Moved warnings relating to all-NaN and all-negative-inf slices to near the synchronization warning
1 parent f69ef28 commit 8d78920

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

dpnp/dpnp_iface_nanfunctions.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ def nanargmax(a, axis=None, out=None, *, keepdims=False):
144144
the user is recommended to filter NaNs themselves and use `dpnp.argmax`
145145
on the filtered array.
146146
147+
Warning
148+
-------
149+
The results cannot be trusted if a slice contains only NaNs
150+
and -Infs.
151+
147152
Parameters
148153
----------
149154
a : {dpnp.ndarray, usm_ndarray}
@@ -173,8 +178,6 @@ def nanargmax(a, axis=None, out=None, *, keepdims=False):
173178
values ignoring NaNs. The returned array must have the default array
174179
index data type.
175180
For all-NaN slices ``ValueError`` is raised.
176-
Warning: the results cannot be trusted if a slice contains only NaNs
177-
and -Infs.
178181
179182
Limitations
180183
-----------
@@ -225,6 +228,11 @@ def nanargmin(a, axis=None, out=None, *, keepdims=False):
225228
the user is recommended to filter NaNs themselves and use `dpnp.argmax`
226229
on the filtered array.
227230
231+
Warning
232+
-------
233+
The results cannot be trusted if a slice contains only NaNs
234+
and -Infs.
235+
228236
Parameters
229237
----------
230238
a : {dpnp.ndarray, usm_ndarray}
@@ -254,8 +262,6 @@ def nanargmin(a, axis=None, out=None, *, keepdims=False):
254262
values ignoring NaNs. The returned array must have the default array
255263
index data type.
256264
For all-NaN slices ``ValueError`` is raised.
257-
Warning: the results cannot be trusted if a slice contains only NaNs
258-
and Infs.
259265
260266
Limitations
261267
-----------

0 commit comments

Comments
 (0)