[Numpy-discussion] in the NA discussion, what can we agree on?
Pauli Virtanen
pav@iki...
Fri Nov 4 17:29:03 CDT 2011
04.11.2011 22:57, T J kirjoitti:
[clip]
> > (m) mark-ignored
> >
> > a := SPECIAL_1
> > # -> a == SPECIAL_a ; the payload of the RHS is neglected,
> > # the assigned value has the original LHS
> > # as the payload
[clip]
> Does this behave as expected for "x + y" (as opposed to the inplace
> operation)?
[clip]
The definition is for assignment, and does not concern binary ops, so it
behaves as expected. The inplace operation
>>> x += y
is defined as equivalent to binary op followed by assignment
>>> x[:] = x + y
as far as the missing values are concerned.
> However, doesn't this have the issue that Nathaniel brought up earlier:
> commutativity
>
> unignore(x + y) != unignore(y + x)
As the definition concerns only what happens on assignment, it does not
have problems with commutativity.
--
Pauli Virtanen
More information about the NumPy-Discussion
mailing list