>>> import numpy as np
>>> c = np.array([1,2,3,4,5,6])
>>> c
array([1, 2, 3, 4, 5, 6])
>>> c = c.reshape(3,-1)
>>> c
array([[1, 2],
[3, 4],
[5, 6]])
-1的含义为根据行(或列)自动计算列(或行)的大小
>>> import numpy as np
>>> c = np.array([1,2,3,4,5,6])
>>> c
array([1, 2, 3, 4, 5, 6])
>>> c = c.reshape(3,-1)
>>> c
array([[1, 2],
[3, 4],
[5, 6]])
-1的含义为根据行(或列)自动计算列(或行)的大小