numpy.nanargmax()

numpy.nanargmax

numpy.nanargmax(a, axis=None) [source]

Return the indices of the maximum values in the specified axis ignoring NaNs. For all-NaN slices ValueError is raised. Warning: the results cannot be trusted if a slice contains only NaNs and -Infs.

登录查看完整内容
Parameters:

a : array_like

Input data.

axis : int, optional

Axis along which to operate. By default flattened input is used.