Write a NumPy program to concatenate two 2-dimensional arrays.Sample arrays: ([[0, 1, 3], [5, 7, 9]], [[0, 2, 4], [6, 8, 10]]
import numpy as np 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(c)
Sample Output:
[[ 0 1 3 0 2 4] [ 5 7 9 6 8 10]]
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