Answers for "np v stack"

0

np v stack

a = np.array([[1], [2], [3]])
>>> b = np.array([[4], [5], [6]])
>>> np.vstack((a,b))
array([[1],
       [2],
       [3],
       [4],
       [5],
       [6]])
Posted by: Guest on March-22-2022
0

np v stack

a = np.array([1, 2, 3])
>>> b = np.array([4, 5, 6])
>>> np.vstack((a,b))
array([[1, 2, 3],
       [4, 5, 6]])
Posted by: Guest on March-22-2022

Python Answers by Framework

Browse Popular Code Answers by Language