numpy.ma.notmasked_edges

numpy.ma.notmasked_edges(a, axis=None)

Find the indices of the first and last not masked values along the given axis in a masked array.

If all values are masked, return None. Otherwise, return a list of 2 tuples, corresponding to the indices of the first and last unmasked values respectively.

Parameters:

axis : int, optional

Axis along which to perform the operation. If None, applies to a flattened version of the array.

Previous topic

numpy.ma.notmasked_contiguous

Next topic

numpy.ma.mask_cols

This Page

Quick search