On Fri, Nov 4, 2011 at 11:08 AM, Lluís <[email protected]> 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
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
