Q:

Write a NumPy program to add an extra column to a NumPy array

0

Write a NumPy program to add an extra column to a NumPy array

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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]]

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now