annbatch.Loader.__iter__

annbatch.Loader.__iter__#

Loader.__iter__()#

Iterate over the on-disk datasets.

Data for all requested datasets is fetched concurrently into a single preallocated buffer, converted to the output format once, and then yielded as direct row-index subsets — no vstack or intermediate concatenation is required.

Yields:

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

Return type:

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