Ticket #820 (closed defect: fixed)
numpy.ma.array ignores mask when asembling masked array inputs
| Reported by: | AndrewStraw | Owned by: | pierregm |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2.0 |
| Component: | numpy.ma | Version: | none |
| Keywords: | Cc: |
Description
The following test fails with r5283. I assume (perhaps wrongly) that this is a bug. It appears numpy.ma.array has an argument keep_mask, which defaults to True. That implied to me that the expected behavior would have passed this test.
{{{import numpy
x = numpy.arange(10) y = numpy.arange(10)+20 z = numpy.arange(10)+40 x = numpy.ma.masked_where(x>5,x)
X1=numpy.ma.array([x,y,z]) X2=numpy.ma.vstack([x[numpy.newaxis,:],
y[numpy.newaxis,:], z[numpy.newaxis,:]])
assert numpy.ma.allclose(X1.mask,X2.mask) }}}
Change History
Note: See
TracTickets for help on using
tickets.
