[Numpy-discussion] how to build a series of arrays as I go?
Chris Withers
chris@simplistix.co...
Mon Mar 17 12:16:46 CDT 2008
Charles Doutriaux wrote:
> 1-)You could use the concatenate function to grow an array as you go.
Thanks. Would it be more efficient to build the whole set of arrays as
lists first or build them as arrays and use concatenate?
> 2-) assumnig you still have your list
>
> b=numpy.array(data[name])
> bmasked=numpy.ma.masked_equal(b,-1)
Excellent, although I ended up using numpy.nan just ot be paranoid, in
case -1 actually showed up in my data...
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk
More information about the Numpy-discussion
mailing list