[SciPy-User] Masked array along one axis
Mon Oct 3 01:08:06 CDT 2011
On Oct 01, 2011, at 10:34 , Gustavo Goretkin wrote:
> I want to use a 2D array to store a set of points. There are n points in d dimensions, so the array is n-by-d.
> I want to use the masked array features of NumPy, but it doesn't make sense to mask only some some components of a point. Either one point is entirely masked or it isn't. In other words, the mask is n-by-1 (or equivalent up to singleton dimensions).
> Does the masked array support this masking only in some axes?
However, instead of considering a nxd array of floats (i.e., a "standard" array), you may want to try a n array of d-fields (i.e., use a structured array). That way, your array would have only one axis and you could mask one row at a time.
More information about the SciPy-User