numpy practice - Serbipunk/notes GitHub Wiki

meshgrid

Return coordinate matrices from coordinate vectors. 从坐标向量,返回坐标矩阵

Make N-D coordinate arrays for vectorized evaluations of 创建 N-D 维度的数组,

N-D scalar/vector fields over N-D grids, given 用于矢量化评估 N-D 输入的标量|向量,

one-dimensional coordinate arrays x1, x2,..., xn. 输入为列 | 行向量。

例子

image

np.c_

    Translates slice objects to concatenation along the second axis.  转换切片的目标,去连接成第二个轴,
    This is short-hand for ``np.r_['-1,2,0', index expression]``, 
        which is useful because of its common occurrence    
    In particular, arrays will be stacked along their last axis after being upgraded to at least 2-D with
    1's post-pended to the shape (column vectors made out of 1-D arrays).
    See Also
    --------
    column_stack : Stack 1-D arrays as columns into a 2-D array.
    r_ : For more detailed documentation.
    Examples
    --------
    >>> np.c_[np.array([1,2,3]), np.array([4,5,6])]    # 看这个能看懂
    array([[1, 4],
           [2, 5],
           [3, 6]])
    >>> np.c_[np.array([1,2,3](/Serbipunk/notes/wiki/1,2,3)), 0, 0, np.array([4,5,6](/Serbipunk/notes/wiki/4,5,6))]
    array([1, 2, 3, ..., 4, 5, 6](/Serbipunk/notes/wiki/1,-2,-3,-...,-4,-5,-6))

np.flipud

图片