np vstack python

Solutions on MaxInterview for np vstack python by the best coders in the world

showing results for - "np vstack python"
Vince
09 Jan 2019
1import numpy as np
2a = np.array([1, 2, 3])
3b = np.array([2, 3, 4])
4np.vstack((a,b))
Max
16 Nov 2018
1>>> a = np.array([[1], [2], [3]])
2>>> b = np.array([[2], [3], [4]])
3>>> np.vstack((a,b))
4array([[1],
5       [2],
6       [3],
7       [2],
8       [3],
9       [4]])
10
Francesca
18 Apr 2016
1>>> a = np.array([[1], [2], [3]])
2>>> b = np.array([[4], [5], [6]])
3>>> np.vstack((a,b))
4array([[1],
5       [2],
6       [3],
7       [4],
8       [5],
9       [6]])
10