Re: [Numpy-discussion] Masked array fill_value

2008-07-19 Thread Pierre GM
On Saturday 19 July 2008 18:41:22 Ryan May wrote: > > There was a thread about this a couple months ago, and Pierre GM > > explained it. I think the point was that indexing is giving you a new > > masked scalar, which is therefore taking the default mask value of the > > type. I don't see it as a

Re: [Numpy-discussion] Masked array fill_value

2008-07-19 Thread Ryan May
Eric Firing wrote: > Ryan May wrote: >> Hi, >> >> I just noticed this and found it surprising: >> >> In [8]: from numpy import ma >> >> In [9]: a = ma.array([1,2,3,4],mask=[False,False,True,False],fill_value=0) >> >> In [10]: a >> Out[10]: >> masked_array(data = [1 2 -- 4], >>mask = [False

Re: [Numpy-discussion] Masked array fill_value

2008-07-19 Thread Eric Firing
Ryan May wrote: > Hi, > > I just noticed this and found it surprising: > > In [8]: from numpy import ma > > In [9]: a = ma.array([1,2,3,4],mask=[False,False,True,False],fill_value=0) > > In [10]: a > Out[10]: > masked_array(data = [1 2 -- 4], >mask = [False False True False], >

[Numpy-discussion] Masked array fill_value

2008-07-19 Thread Ryan May
Hi, I just noticed this and found it surprising: In [8]: from numpy import ma In [9]: a = ma.array([1,2,3,4],mask=[False,False,True,False],fill_value=0) In [10]: a Out[10]: masked_array(data = [1 2 -- 4], mask = [False False True False], fill_value=0) In [11]: a[2] Out[11]: mas