[Numpy-discussion] missing data discussion round 2

Nathaniel Smith njs at pobox.com
Thu Jun 30 14:53:40 EDT 2011


On Wed, Jun 29, 2011 at 2:21 PM, Eric Firing <efiring at hawaii.edu> wrote:
> In addition, for new code, the full-blown masked array module may not be
> needed.  A convenience it adds, however, is the automatic masking of
> invalid values:
>
> In [1]: np.ma.log(-1)
> Out[1]: masked
>
> I'm sure this horrifies some, but there are times and places where it is
> a genuine convenience, and preferable to having to use a separate
> operation to replace nan or inf with NA or whatever it ends up being.

Err, but what would this even get you? NA, NaN, and Inf basically all
behave the same WRT floating point operations anyway, i.e., they all
propagate?

Is the idea that if ufunc's gain a skipna=True flag, you'd also like
to be able to turn it into a skipna_and_nan_and_inf=True flag?

-- Nathaniel



More information about the NumPy-Discussion mailing list