小技巧 array增加一列

X_new=np.array([5,2.9,1,0.2])

X_new.shape=X_new[np.newaxis,:].shape

原文地址:https://www.cnblogs.com/vivianzy1985/p/9222725.html