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)
评论列表
文章目录