### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Masked array operations »

# numpy.ma.flatnotmasked_contiguous

`numpy.ma.``flatnotmasked_contiguous`(a)

  Find contiguous unmasked data in a masked array along the given axis.

  Parameters : | a : narray The input array.
  Returns : | slice_list : list A sorted sequence of slices (start index, end index).

  See also

  `flatnotmasked_edges`, `notmasked_contiguous`, `notmasked_edges`

  Notes

  Only accepts 2-D arrays at most.

  Examples

      >>> a = np.arange(10)
      >>> mask = (a < 3) | (a > 8) | (a == 5)
      >>> ma = np.ma.array(a, mask=mask)
      >>> np.array(ma[~ma.mask])
      array([3, 4, 6, 7, 8])

      >>> np.ma.extras.flatnotmasked_contiguous(ma)
      [slice(3, 4, None), slice(6, 8, None)]
      >>> ma = np.ma.array(a, mask=np.ones_like(a))
      >>> print np.ma.extras.flatnotmasked_edges(ma)
      None

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- NumPy v1.5 Manual (DRAFT) »
- NumPy Reference »
- Routines »
- Masked array operations »