def chunks(arr, n):
    """Yield successive n-sized chunks from arr."""
    for i in range(0, len(arr), n):
        yield arr[i : i + n]
Yield successive n-sized chunks from arr.
experiments/evaluate.py