How to concatenate NumPy arrays in Python

Concatenating two NumPy arrays appends the rows of one array to the other. For example, concatenating [[1 1 1] [2 2 2]] with [[3 3 3] [4 4 4]] results in [[1 1 1] [2 2 2] [3 3 3] [4 4 4]].

Solution for How to concatenate NumPy arrays in Python : You can use numpy.concatenate() to concatenate arrays Call numpy.concatenate(sequence) to concatenate a sequence of arrays together.


how-to-concatenate-numpy-arrays-in-python