Charles R Harris wrote: > File a ticket. #703
Eric > > On Mon, Mar 17, 2008 at 12:26 PM, Eric Firing <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Pierre, > > I just tripped over what boils down to the sequence given below. It > would be useful if the error in line 53 were trapped right away; as it > is, it results in a masked array that looks reasonable but fails in a > non-obvious way. > > Eric > > In [52]:x = [1,2] > > In [53]:y = ma.masked_where(False, x) > > In [54]:y > Out[54]: > masked_array(data = [1 2], > mask = False, > fill_value=999999) > > > In [55]:y[1] > > --------------------------------------------------------------------------- > IndexError Traceback (most recent > call last) > > /home/efiring/<ipython console> in <module>() > > /usr/local/lib/python2.5/site-packages/numpy/ma/core.pyc in > __getitem__(self, indx) > 1307 if not getattr(dout,'ndim', False): > 1308 # Just a scalar............ > -> 1309 if m is not nomask and m[indx]: > 1310 return masked > 1311 else: > > IndexError: 0-d arrays can't be indexed > > _______________________________________________ > Numpy-discussion mailing list > [email protected] <mailto:[email protected]> > http://projects.scipy.org/mailman/listinfo/numpy-discussion > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Numpy-discussion mailing list > [email protected] > http://projects.scipy.org/mailman/listinfo/numpy-discussion _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
