sequence multiplied by -1

Gregory Ewing greg.ewing at canterbury.ac.nz
Mon Oct 4 18:09:45 EDT 2010


Carl Banks wrote:
> Numpy uses + for elementwise addition, and a function
> called concatenate for concatenation.  If Python lists used a separate
> concatenation operator, then Numpy arrays could use that for
> concatenation.

Actually it couldn't, except for the special case of
concatenating along the first axis. The concatenate()
function allows specifying an axis.

There's also the problem that applying a concatenation
operator to a numpy array of Python sequences would be
ambiguous -- does it mean concatenating the arrays, or
elementwise concatenation of their contents?

-- 
Greg



More information about the Python-list mailing list