📜  python将列添加到矩阵 - Python代码示例

📅  最后修改于: 2022-03-11 14:47:01.829000             🧑  作者: Mango

代码示例2
import numpy as np

X = np.random.uniform(size=(10,3))
n,m = X.shape # for generality
X0 = np.ones((n,1))
Xnew = np.hstack((X,X0))