On Sat, Mar 5, 2011 at 9:00 PM, Travis Oliphant <[email protected]>wrote:
> My point is also that we need to make sure the broadcasting rules are > consistent for both addition and array copy. > > Addition would not create an error if a (1,20) array was added to a (20,) > array. Therefore, a (1,20) array can also copied into a (20,) array --- as > can a (1,1,1,1,20) array. Conversely, a (20,1) or a (1,1,20,1,1) array can > not be copied into a (20,) array. > Well, adding a (1,20) array to a (20,) array gives a (1,20) array. Changing this for assignment is like english spelling ( 'I' before 'e' except after 'c', or sounded 'a' as in neighbor and weigh -- with various exceptions) or having to learn to conjugate irregular verbs. Most illogical. That said, I suppose we have to support it for backward compatibility. It doesn't seem to be used that much, however, probably because it isn't obvious. Chuck
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
