9951 explained code solutions for 126 technologies


python-numpyHow to concatenate Numpy arrays


import numpy as np

a = np.array([1, 2, 3])
b = np.array([5, 6, 7])

joined = np.concatenate((a, b))ctrl + c
import numpy as np

load Numpy module for Python

(a, b)

arrays to concatenate (you can concatenate any number of arrays)

np.concatenate

joins a sequence of arrays

joined

resulting array of values from joined arrays