[Numpy-discussion] more recfunctions, structured array help
Pierre GM
pgmdevlist@gmail....
Tue Dec 8 16:23:23 CST 2009
On Dec 8, 2009, at 4:53 PM, John [H2O] wrote:
> This is what I get:
>
> In [74]: type(cd)
> Out[74]: <class 'numpy.core.records.recarray'>
>
> In [75]: type(cd.co)
> Out[75]: <type 'numpy.ndarray'>
>
> In [76]: cd[cd['co']==-9999.] = np.ma.masked
> ---------------------------------------------------------------------------
> ValueError Traceback (most recent call last)
>
> /home/jfb/Research/arctic_co/co_plot.py in <module>()
> ----> 1
> 2
> 3
> 4
> 5
>
> ValueError: tried to set void-array with object members using buffer.
John,
* Could you post self contained example next time ?
* cd should be a MaskedRecords or MaskedArray before you can mask it
More information about the NumPy-Discussion
mailing list