Move files
This commit is contained in:
parent
3cf28379e8
commit
00cc8225c5
159 changed files with 31 additions and 49 deletions
9
great_ai/utilities/unchunk.py
Normal file
9
great_ai/utilities/unchunk.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
from typing import Iterable, Optional, TypeVar
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
def unchunk(chunks: Iterable[Optional[Iterable[T]]]) -> Iterable[T]:
|
||||
for chunk in chunks:
|
||||
if chunk is not None:
|
||||
yield from chunk
|
||||
Loading…
Add table
Add a link
Reference in a new issue