def make_batches(N_data, batch_size):
    return [slice(i, min(i+batch_size, N_data))
            for i in range(0, N_data, batch_size)]
dataset/ETHPy150Open HIPS/autograd/examples/neural_net.py/make_batches/original