pyhon数组维度改变(7,)->(7,1) 2020-05-10 本文已影响0人 ChihyongChen x.shape=(7,) 想要结果:x.shape=(7,1) 方法:1. np.reshape(x, (-1, 1)) 2. x.shape = (-1, 1)