import dascore as dc
= dc.get_example_spool("diverse_das")
spool # split spool into list of spools each with 3 patches.
= spool.split(size=3)
split # split spool into 3 evenly sized (if possible) spools
= spool.split(count=3) split
split
split(
self ,
size: int | None[int, None] = None,
count: int | None[int, None] = None,
)-> ‘Generator[Self, None, None]’
Yield sub-patches based on specified parameters.
Parameters
Parameter | Description |
---|---|
size |
The number of patches desired in each output spool. The last spool may have fewer patches. |
count |
The number of spools to include. If count is greater than the length of the spool then the output will be smaller than count, with one patch per spool. |