nanargmax#
- class saiunit.math.nanargmax(a, axis=None, keepdims=False, **kwargs)#
Return the index of the maximum value, ignoring NaNs.
Units are stripped before finding the maximum.
- Parameters:
- Returns:
index – Index of the maximum value (NaNs ignored).
- Return type:
Array
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> u.math.nanargmax(jnp.array([1.0, jnp.nan, 3.0])) Array(2, dtype=int32)