Name

concatenate

Synopsis

concatenate(arrays, axis=0)

arrays is a sequence of arrays, all with the same shape except possibly along the given axis. concatenate returns an array that is the concatenation of the arrays along the given axis. In particular, concatenate((s,)*n) has the same sequence replication semantics that s * n would have if s were a generic Python sequence rather than an array. For example:

print Numeric.concatenate([Numeric.arange(5),
                           Numeric.arange(3)])
# prints: [0 1 2 3 4 0 1 2]

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.