batchify

safe_learning.utilities.batchify(arrays, batch_size)

Yield the arrays in batches and in order.

The last batch might be smaller than batch_size.

Parameters:
arrays : list of ndarray

The arrays that we want to convert to batches.

batch_size : int

The size of each individual batch.