原文:https://docs.scipy.org/doc/numpy/reference/generated/numpy.ma.MaskedArray.compressed.html
校对:(虚位以待)
MaskedArray.
compressed
()[source]将所有非屏蔽数据作为1-D数组。
返回: | data:ndarray
|
---|
笔记
结果是不 a MaskedArray!
例子
>>> x = np.ma.array(np.arange(5), mask=[0]*2 + [1]*3)
>>> x.compressed()
array([0, 1])
>>> type(x.compressed())
<type 'numpy.ndarray'>