# welcome to softhunt.net
# Python Program illustrating
# numpy.append()
import numpy as np
#Working on 1D
arr1 = np.arange(8).reshape(2, 4)
print("2D arr1 :
", arr1)
print("Shape : ", arr1.shape)
arr2 = np.arange(8, 16).reshape(2, 4)
print("
2D arr2 :
", arr2)
print("Shape : ", arr2.shape)
# appending the arrays
arr3 = np.append(arr1, arr2)
print("
Appended arr3 by flattened : ", arr3)
# appending the arrays with axis = 0
arr3 = np.append(arr1, arr2, axis = 0)
print("
Appended arr3 with axis 0 :
", arr3)
# appending the arrays with axis = 1
arr3 = np.append(arr1, arr2, axis = 1)
print("
Appended arr3 with axis 1 :
", arr3)