np.stack(M code example
Example 1: np.stack
>>> a = np.array([1, 2, 3])
>>> b = np.array([2, 3, 4])
>>> np.stack((a, b))
array([[1, 2, 3],
[2, 3, 4]])
Example 2: np.stack
>>> np.stack((a, b), axis=-1)
array([[1, 2],
[2, 3],
[3, 4]])