In This article we are going to share Solution for Python Program to Take two NumPy arrays having two dimensions. Concatenate the arrays on axis 1.

Program Code:

#Take two NumPy arrays having two dimensions.

#Concatenate the arrays on axis 1

import numpy as np  #import numpy

a = np.array([[0, 1, 3], [5, 7, 9]])

b = np.array([[0, 2, 4], [6, 8, 10]])

c = np.concatenate((a, b), 1)

print("After Concatenating array and b: ",c)

 

Output:

After Concatenating array and b:  [[ 0  1  3  0  2  4]
 [ 5  7  9  6  8 10]]