stacking.py 文件源码

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

项目:npstreams 作者: LaurentRDC 项目源码 文件源码
def iflatten(arrays):
    """
    flatten the arrays in a stream into a single, 1D array. Note that
    the order of flattening is not guaranteed.

    Parameters
    ----------
    arrays : iterable
        Stream of NumPy arrays. Contrary to convention, these
        arrays do not need to be of the same shape. 

    Yields
    ------
    online_flatten : ndarray
        Cumulative flattened array.
    """
    arrays = map(np.ravel, arrays)
    yield from istack(arrays, axis = 0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号