Python生成数组

来源:互联网 发布:mac怎么输入罗马数字 编辑:程序博客网 时间:2024/05/17 05:58
c = ones((4, 1))d = random.rand(1, 4)e = c+dprint e

[[ 1.1846909   1.91747555  1.36506901  1.39017505]
 [ 1.1846909   1.91747555  1.36506901  1.39017505]
 [ 1.1846909   1.91747555  1.36506901  1.39017505]
 [ 1.1846909   1.91747555  1.36506901  1.39017505]]
0 0