I was wondering if numpy can supply the second dim automatically, because I don't want to calculate everytime, for example:
a1 = np.array([[ 0, 1, 2, 3, 4, 5],[ 6, 7, 8, 9, 10, 11]])
a2 = np.reshape(a1,(3, a1.shape[0] * a1.shape[1] / 3))
However, if you use a2 = np.reshape(a1, (3, ))
it shows error:
cannot reshape array of size 12 into shape (3,)