numpy, 100X100 :
import numpy as np
x = np.ndarray((100, 100))
x.shape
numpy 10000 10000 , ,
, 10X1000 , 10000 :
x = x.reshape((10, 1000))
10X2000 , .
x.reshape((10, 2000))
ValueError: total size of new array must be unchanged
-1, , , :
numpy , .
:
x = x.reshape((10, 1000))
:
x = x.reshape((10, -1))
, numpy , 10000 / 10, .
-1 .
:
x = x.reshape((-1, 1000))
, numpy , , , .
x = x.reshape((-1, -1))
ValueError: can only specify one unknown dimension