Answers for "numpy convert 1d to 2d"

0

numpy convert 1d to 2d

a = np.arange(6).reshape((3, 2))
>>> a
array([[0, 1],
       [2, 3],
       [4, 5]])
Posted by: Guest on February-01-2022

Python Answers by Framework

Browse Popular Code Answers by Language