Write a NumPy program to add an extra column to a NumPy array
import numpy as np x = np.array([[10,20,30], [40,50,60]]) y = np.array([[100], [200]]) print(np.append(x, y, axis=1))
Sample Output:
[[ 10 20 30 100] [ 40 50 60 200]]
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer