numpy.concatenate() in Python

The numpy.concatenate() function joins a sequence of arrays along an existing axis.



a1, a2, … : This parameter represents the sequence of the array where they must have the same shape, except in the dimension corresponding to the axis .

axis: It is an optional parameter which takes integer values, and by default, it is 0. It represents the axis along which the arrays will be joined. If the axis is none, arrays are flattened before use.

out: This parameter represents the destination to place the result.


This function returns the concatenated array.

Example 1


Pin It on Pinterest

Share This