scripts/helpers.py
def subarray_generator(arr, subarray_size):
    """
    Yields blocks of size subarray_size from a given array. The blocks are split off from 
    the first dimension of the array, e.g. array 100 x 20, subarray_size 10 -> block size: 10 x 20
    """
    i = 0
    while i < len(arr):
        yield arr[i : i + subarray_size], i
        i += subarray_size

    Yields blocks of size subarray_size from a given array. The blocks are split off from 
    the first dimension of the array, e.g. array 100 x 20, subarray_size 10 -> block size: 10 x 20
    
Yields blocks of size subarray_size from a given array. The blocks are split off from
the first dimension of the array, e.g.
Yields blocks of size subarray_size from a given array . The blocks are split off from the first dimension of the array e . g .
def subarray_generator(arr, subarray_size):
    i = 0
    while i < len(arr):
        yield arr[i : i + subarray_size], i
        i += subarray_size
def subarray_generator ( arr , subarray_size ) : i = 0 while i < len ( arr ) : yield arr [ i : i + subarray_size ] , i i += subarray_size
Yields blocks of size subarray_size from a given array.
Yields blocks of size subarray_size from a given array .
"""
    Yields blocks of size subarray_size from a given array. The blocks are split off from 
    the first dimension of the array, e.g. array 100 x 20, subarray_size 10 -> block size: 10 x 20
    """
arr
subarray_size