AnnCollection.iterate_axis(batch_size, axis=0, shuffle=False, drop_last=False)

Iterate the lazy object over an axis.

batch_size : int

How many samples to put into a batch when iterating.

axis : {0, 1}Literal[0, 1] (default: 0)

The axis to iterate over.

shuffle : bool (default: False)

Set to True to have the indices reshuffled before iterating.

drop_last : bool (default: False)

Set to True to drop a batch with the length lower than batch_size.