标签:
ndarray
a =array([[1,2,3],[4,5,6],[7,8,9],[10,11,12]])
min(axis=None)
max(axis=None)
axis 解释 0 矩阵列 1 矩阵行
a.min(0) array([1, 2, 3]) a.min(1) array([ 1, 4, 7, 10])
def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None)
N=3 x1 = np.linspace(0, 10, N, endpoint=True) 0~10之间的数分成N等分 array([ 0., 5., 10.])
def logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None) 0~10之间的数分成N等分 然后10** 等分值
N=3 x1 = np.logspace(0, 10, N, endpoint=True) array([ 1.00000000e+00, 1.00000000e+05, 1.00000000e+10]) #10**0 ,10**5, 10**10
np.random.shuffle() 打乱顺序
y = np.dot(X, coef) 内积
标签:
原文地址:http://www.cnblogs.com/kyostone/p/5726291.html