numpy.ma.MaskedArray.compressed
method
- 
MaskedArray.compressed()[source]
- 
Return all the non-masked data as a 1-D array. Returns: - 
data : ndarray
- 
A new ndarrayholding the non-masked data is returned.
 NotesThe result is not a MaskedArray! Examples>>> x = np.ma.array(np.arange(5), mask=[0]*2 + [1]*3) >>> x.compressed() array([0, 1]) >>> type(x.compressed()) <type 'numpy.ndarray'> 
- 
    © 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
    https://docs.scipy.org/doc/numpy-1.16.1/reference/generated/numpy.ma.MaskedArray.compressed.html