[Numpy-discussion] bug with with fill_values in masked arrays?

Hans Meine meine@informatik.uni-hamburg...
Tue Apr 8 03:47:44 CDT 2008


Am Dienstag, 25. März 2008 15:33:58 schrieb Chris Withers:
> > Because in your particular case, you're inspecting elements one by one,
> > and then, your masked data becomes the masked singleton which is a
> > special value.
>
> I'd argue that the masked singleton having a different fill value to the
> ma it comes from is a bug.

Note that there's no "ma it comes from".  It's a singleton.  A special value.  
And your suggestion with isinstance would surely be less efficient than the 
current solution, since using the "is" operator for identity checking is as 
efficient as it gets.  Just ignore the fill_value, which is only there for 
technical reason; it's unused in any case.

Thanks to this discussion, I finally got an impression of ma.

-- 
Ciao, /  /
     /--/
    /  / ANS


More information about the Numpy-discussion mailing list