zoukankan      html  css  js  c++  java
  • numpy

    funciton interpretation
    np.array()
    np.arange(start, end, step)
    np.linspace(start, end, count) from start to end, equal margin
    np.copy()
    np.hstack(tuple) Stack arrays in sequence horizontally (column wise)
    np.vstack(tuple) Stack arrays in sequence vertically (row wise)
    numpy.random.rand(d0,d1,d2,...,dN) d is dimention,float values betweent 0 and 1
    numpy.zeros(shape, dtype=float, order='C') order = 'C' is row-major, F is column-major storage in memory
    numpy.nditer() iterator for array
    np.dot() dot product
    np.cross() cross product
    np.max() get maximum value from tensor
    np.amax(arr, axis) get maximum value from given axis
    np.sum(arr, axis) sum of all elements if using default axis
    np.average(arr, axis,weights) average of all elements if using default axis
    np.mean(arr, axis) equal to np.average while weights is 1
    np.std() standard deviation
    np.tolist()
    np.isnan(value)
    np.full() fill all ndarray with one value
    np.ones() fill all adarray with 1
    np.flatten()
  • 相关阅读:
    POJ 1753(1)
    2015.12 杭电校赛 Bitwise Equations
    codeforces B
    POJ2387 水水最短路
    CodeForces 337C SDUT秋季训练--周赛(10.31)
    HDU 1241
    POJ 3126 Prime Path
    HDU 2612
    POJ 1426 Find The Multiple
    day94 flask-session 表单验证 信号 SQLALchemy
  • 原文地址:https://www.cnblogs.com/ashyLoveLoli/p/15194287.html
Copyright © 2011-2022 走看看