Lionel Roubeyrie wrote: > Hi all, > Is it possible to put masked values into recarrays, I need a array with > heterogenous types of datas (datetime objects in the first col, all others > are float) but with missing values in some records. For the moment, I don't > find any solution for that. Either use "nans" or "inf" for missing values or use the masked array object with a complex data-type. You don't need to use a recarray object to get "records". Any array can have "records". Therefore, you can have a masked array of "records" by creating an array with the appropriate data-type.
It may also be possible to use a recarray as the "array" for the masked array object becuase the recarray is a sub-class of the array. > I have tried with arrays of dtype=object, but I > have problem when I want to compute min, max, ... with an error like: > TypeError: function not supported for these types, and can't coerce safely to > supported types. > It looks like the max and min functions are not supported for Object arrays. import numpy as N N.maximum.types does not include Object arrays. It probably should. -Travis ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion