numpy 和 matlab 的 reshape
numpy
>>> import numpy as np
>>> a=np.array([1,2],[3,4])
array([[1, 2],
[3, 4]])
>>> np.reshape(a,(1,4))
array([[1, 2, 3, 4]])
matlab
>> a=[1,2;3,4]
a =
1 2
3 4
>> reshape(a,1,4)
ans =
1 3 2 4