标签:range and numpy python imp import port random dom
import numpy as np
import scipy as sp
print(np.zeros((3,2)))
print(np.array([[1.,2.],[3.,4.]]))
print(np.random.rand(2,3))
print(np.asmatrix(np.eye(4)))
print(np.arange(12))
print(np.mat([[2.,30.],[100.,200.]]))
[[0. 0.]
[0. 0.]
[0. 0.]]
[[1. 2.]
[3. 4.]]
[[0.63820606 0.72789238 0.11642889]
[0.44120831 0.70662835 0.26627214]]
[[1. 0. 0. 0.]
[0. 1. 0. 0.]
[0. 0. 1. 0.]
[0. 0. 0. 1.]]
[ 0 1 2 3 4 5 6 7 8 9 10 11]
[[ 2. 30.]
[100. 200.]]
标签:range and numpy python imp import port random dom
原文地址:http://blog.51cto.com/13959448/2326616