astropy.utils
astropy.utils.masked
Like numpy.nanargmax, skipping masked values as well.
numpy.nanargmax
No exceptions are raised for fully masked/NaN slices. Instead, these give index 0.