Movatterモバイル変換


[0]ホーム

URL:


SciPy

numpy.ma.masked_array.compressed

masked_array.compressed()[source]

Return all the non-masked data as a 1-D array.

Returns:

data : ndarray

A newndarray holding the non-masked data is returned.

Notes

The result isnot 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'>
  • © Copyright 2008-2009, The Scipy community.
  • Last updated on Jun 10, 2017.
  • Created usingSphinx 1.5.3.

[8]ページ先頭

©2009-2025 Movatter.jp