annbatch.Loader.__iter__

annbatch.Loader.__iter__#

Loader.__iter__()#

Iterate over the on-disk datasets.

Data is fetched from N on-disk anndata objects, returning N blocks which are then either concatenated immediately and then yieled/shuffled, or subsetted to shuffled subsets and then concatenated/yielded. See concat_strategy initialization argument for more information.

Yields:

A batch of data along with its obs and index (both optional).

Return type:

Iterator[LoaderOutput[csr_matrix | ndarray | csr_matrix | ndarray | Tensor]]