Re: using masks and numpy record arrays

2011-05-25 Thread Robert Kern
On 5/25/11 3:27 PM, Catherine Moroney wrote: Hello, I am trying to work with a structured array and a mask, and am encountering some problems. You will want to ask numpy questions on the numpy mailing list: http://www.scipy.org/Mailing_Lists For example: >>> xtype = numpy.dtype([("n", n

using masks and numpy record arrays

2011-05-25 Thread Catherine Moroney
Hello, I am trying to work with a structured array and a mask, and am encountering some problems. For example: >>> xtype = numpy.dtype([("n", numpy.int32), ("x", numpy.float32)]) >>> a = numpy.zeros((4), dtype=xtype) >>> b = numpy.arange(0,4) >>> a2 = numpy.zeros((4), dtype=xtype) >>> mask =