import numpy as np
函数原型: numpy.array(object, dtype = None, copy = True, order = None, subok = False, ndmin = 0)
# 创建向量:
v = [1,2,3,4,5]
print(np.array(v))
# 创建矩阵
print(np.array([v,v]))
# 创建矩阵
print(np.array( [[1,1,1,1,1],v] ) )
# ndmin
print('dmin = 1 : ', np.array(v, ndmin=1))
print('dmin = 2 : ', np.array(v, ndmin=2))
print('dmin = 3 : ', np.array(v, ndmin=3))
# dtype
print(np.array(v, dtype=np.float))
print(np.array(v, dtype=np.int16))
print(np.array(v, dtype=np.complex)) # 复数类型