anndata.experimental.AnnCollection.iterate_axis (original) (raw)
anndata.experimental.AnnCollection.iterate_axis#
AnnCollection.iterate_axis(batch_size, axis=0, shuffle=False, drop_last=False)[source]#
Iterate the lazy object over an axis.
Parameters:
batch_size int
How many samples to put into a batch when iterating.
axis 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
.