Note
Numpy (7) 본문
728x90
How to reshape an array?
arr = np.arange(10)
arr.reshape(2, -1)
output
array([[0, 1, 2, 3, 4],
[5, 6, 7, 8, 9]])
Comments
arr = np.arange(10)
arr.reshape(2, -1)
output
array([[0, 1, 2, 3, 4],
[5, 6, 7, 8, 9]])