>>> a = np.array([1, 2, 3]) >>> a = a.reshape(-1, 1) #-1表示任意行数,1表示1列 >>> a array([[1], [2], [3]])
有时候接口会报错,需要reshape一下