Re: bug with with fill_values in masked arrays?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bug with with fill_values in masked arrays?

Hans Meine-4
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
_______________________________________________
Numpy-discussion mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Loading...