np stack

Solutions on MaxInterview for np stack by the best coders in the world

showing results for - "np stack"
Christian
23 Nov 2019
1>>> a = np.array([1, 2, 3])
2>>> b = np.array([2, 3, 4])
3>>> np.stack((a, b))
4array([[1, 2, 3],
5       [2, 3, 4]])
6
Casey
27 Jul 2017
1>>> np.stack((a, b), axis=-1)
2array([[1, 2],
3       [2, 3],
4       [3, 4]])
5
Simona
05 May 2017
1>>> np.stack((a, b), axis=-1)
2array([[1, 2],
3       [2, 3],
4       [3, 4]])
5
Dante
28 Jun 2019
1>>> a = np.array([1, 2, 3])
2>>> b = np.array([2, 3, 4])
3>>> np.stack((a, b))
4array([[1, 2, 3],
5       [2, 3, 4]])
6