numpy.concatenate([arr1, arr2]) # Joining arr1 and arr2
a = np.array([1, 2, 3, 4])
b = np.array([5, 6, 7, 8])
np.concatenate((a, b))
#concatenating through column(axis = 1)
numpy.concatenate((N,M),1)
# Program to concatenate two 2D arrays row-wise
import numpy as np
# Creating two 2D arrays
arr1 = np.arange(1, 10).reshape(3, 3)
arr2 = np.arange(10, 19).reshape(3, 3)
# Concatenating operation
# axis = 0 implies that it is being done row-wise
np.concatenate((arr1, arr2), axis=0)