fix a bug with numpy.shape() of the numpy v1.9

np.shape([1,2,3]) returns (3L,)