MCPcopy Index your code
hub / github.com/numpy/numpy / replace_masked

Function replace_masked

numpy/ma/extras.py:817–825  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

815 low_high = np.take_along_axis(asorted, lh, axis=axis)
816
817 def replace_masked(s):
818 # Replace masked entries with minimum_full_value unless it all values
819 # are masked. This is required as the sort order of values equal or
820 # larger than the fill value is undefined and a valid value placed
821 # elsewhere, e.g. [4, --, inf].
822 if np.ma.is_masked(s):
823 rep = (~np.all(asorted.mask, axis=axis, keepdims=True)) & s.mask
824 s.data[rep] = np.ma.minimum_fill_value(asorted)
825 s.mask[rep] = False
826
827 replace_masked(low_high)
828

Callers 1

_medianFunction · 0.85

Calls 1

allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…