Re: [Numpy-discussion] how to use masked arrays

2008-05-14 Thread Pierre GM
On Wednesday 14 May 2008 13:19:55 Eric Firing wrote: > Pierre GM wrote: > > (almost) equivalent [1]: > mydata._data > mydata.view(np.ndarray) > > Shouldn't the former be discouraged, on the grounds that a leading > underscore, by Python convention, indicates an attribute that is not > par

Re: [Numpy-discussion] how to use masked arrays

2008-05-14 Thread Eric Firing
Pierre GM wrote: [...] > > * If you want to access the underlying data directly, these two commands are > (almost) equivalent [1]: mydata._data mydata.view(np.ndarray) Shouldn't the former be discouraged, on the grounds that a leading underscore, by Python convention, indicates an att

Re: [Numpy-discussion] how to use masked arrays

2008-05-14 Thread Pierre GM
On Wednesday 14 May 2008 02:18:06 Christopher Burns wrote: > I'm finding it difficult to tell which methods/operations respect the > mask and which do not, in masked arrays. Christopher, Unfortunately, there's no tutorial yet. Perhaps could you get one started on the scipy wiki ? I'm afraid I wo

[Numpy-discussion] how to use masked arrays

2008-05-13 Thread Christopher Burns
I'm finding it difficult to tell which methods/operations respect the mask and which do not, in masked arrays. mydata.filled returns a copy of the data (in a numpy array) with all masked elements set to the fill_value. So, masked respected, but data returned as a new data-type when what I wanted