chunk_boxes
chunk_boxes(
array: ‘LazyArray’ ,
block_size: ‘int | None’ = None,
)-> ‘list[Box]’
Cut a lazy array into the boxes it is computed in.
There is one box if none of the arrays needed to compute it is larger than the block size, or if no step computes anything: reading in pieces would only open each file again. Otherwise the box is halved along the first axis worth cutting until its arrays fit. An axis a step needs whole is never worth cutting, so the block size is aimed for rather than promised.
Parameters
| Parameter | Description |
|---|---|
| array | The lazy array. |
| block_size |
The most bytes any one array of a box should hold; thelazy_block_size setting by default, and 0 for one box.
|