cupy.nanargmax#

cupy.nanargmax(a, axis=None, dtype=None, out=None, keepdims=False)[source]#

Return the indices of the maximum values in the specified axis ignoring NaNs. For all-NaN slice -1 is returned. Subclass cannot be passed yet, subok=True still unsupported

Parameters:
  • a (cupy.ndarray) – Array to take nanargmax.

  • axis (int) – Along which axis to find the maximum. a is flattened by default.

Returns:

The indices of the maximum of a along an axis ignoring NaN values.

Return type:

cupy.ndarray

Note

For performance reasons, cupy.nanargmax returns out of range values for all-NaN slice whereas numpy.nanargmax raises ValueError