numerics.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:npstreams 作者: LaurentRDC 项目源码 文件源码
def imax(arrays, axis, ignore_nan = False):
    """ 
    Maximum of a stream of arrays along an axis.

    Parameters
    ----------
    arrays : iterable
        Arrays to be reduced.
    axis : int or None, optional
        Axis along which the maximum is found. The default
        is to find the maximum along the 'stream axis', as if all arrays in ``array``
        were stacked along a new dimension. If ``axis = None``, arrays in ``arrays`` are flattened
        before reduction.
    ignore_nan : bool, optional
        If True, NaNs are ignored. Default is propagation of NaNs.

    Yields
    ------
    online_max : ndarray
        Cumulative maximum.
    """
    ufunc = np.fmax if ignore_nan else np.maximum
    yield from ireduce_ufunc(arrays, ufunc, axis)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号