sequence multiplied by -1

Gregory Ewing greg.ewing at
Tue Oct 5 00:09:45 CEST 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?


More information about the Python-list mailing list