python reshape array without numpy. reshape(a, newshape, order='C