[Numpy-discussion] in the NA discussion, what can we agree on?

Benjamin Root ben.root at ou.edu
Fri Nov 4 12:31:01 EDT 2011

On Fri, Nov 4, 2011 at 11:08 AM, Lluís <xscript at gmx.net> wrote:

> Gary Strangman writes:
> [...]
> > destructive + non-propagating = the data point is truly missing, this is
> the
> > nature of that data point, such missingness should be replicated in
> elementwise
> > operations, but such missingness should NOT interfere with reduction
> operations
> > that involve that datapoint (np.sum([1,MISSING])=1)
> What do you define as element-wise operations?
> Is a sum on an array an element-wise operation?
>  >>> [1, MISSING]+2
>  [1, MISSING]
did you mean [3, MISSING]?

> Or is it just a form of reduction (after shape broadcasting)?
>  >>> [1, MISSING]+2
>  [3, 2]
> For me it's the second, so the only time where special values "propagate"
> in a
> non-propagating scenario is when you slice an array.
Propagation has a very specific meaning here, and I think it is causing
confusion elsewhere.  Propagation (to me) is the *exact* same behavior that
occurs with NaNs, but generalized to any dtype.  It seems like you are
taking "propagate" to mean whether the mask of the inputs follow on to the
mask of the output.  This is related, but is possibly a murkier concept and
should probably be cleaned up.

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20111104/8f746e99/attachment.html>

More information about the NumPy-Discussion mailing list