Re: mask one array using another array

2011-11-21 Thread questions anon
thank you, that makes sense. I should have posted this on another list (which I have now). and the change required is: If your new array is x, you can use: numpy.ma.masked_array(x, mask=mask.mask) On Tue, Nov 22, 2011 at 11:48 AM, MRAB wrote: > On 21/11/2011 21:42, questions anon wrote: > >>

Re: mask one array using another array

2011-11-21 Thread MRAB
On 21/11/2011 21:42, questions anon wrote: I am trying to mask one array using another array. I have created a masked array using mask=MA.masked_equal(myarray,0), that looks something like: [1 - - 1, 1 1 - 1, 1 1 1 1, - 1 - 1] I have an array of values that I want to mask whe