utils.py
def stencil_converter(stencil: list, ndims: int) -> list:
    """
    Takes in the flattend stencil list and returns it
    in forms of tuples
    :param stencil: flattend list of rel. coord. Ex: [0, 1, 0, 2], ndims = 2
    :return: list with tuples. Ex: [(0, 1), (0, 2)]
    """
    converted_stencil = []
    for i in range(0, len(stencil), ndims):
        new_tuple = []
        for d in range(ndims):
            new_tuple.append(stencil[i + d])
        converted_stencil.append(tuple(new_tuple))
    return converted_stencil

    Takes in the flattend stencil list and returns it
    in forms of tuples
    :param stencil: flattend list of rel. coord. Ex: [0, 1, 0, 2], ndims = 2
    :return: list with tuples. Ex: [(0, 1), (0, 2)]
    
Takes in the flattend stencil list and returns it
in forms of tuples
Takes in the flattend stencil list and returns it in forms of tuples
def stencil_converter(stencil: list, ndims: int) -> list:
    converted_stencil = []
    for i in range(0, len(stencil), ndims):
        new_tuple = []
        for d in range(ndims):
            new_tuple.append(stencil[i + d])
        converted_stencil.append(tuple(new_tuple))
    return converted_stencil
def stencil_converter ( stencil : list , ndims : int ) -> list : converted_stencil = [ ] for i in range ( 0 , len ( stencil ) , ndims ) : new_tuple = [ ] for d in range ( ndims ) : new_tuple . append ( stencil [ i + d ] ) converted_stencil . append ( tuple ( new_tuple ) ) return converted_stencil
Takes in the flattend stencil list and returns it
in forms of tuples
Takes in the flattend stencil list and returns it in forms of tuples
"""
    Takes in the flattend stencil list and returns it
    in forms of tuples
    :param stencil: flattend list of rel. coord. Ex: [0, 1, 0, 2], ndims = 2
    :return: list with tuples. Ex: [(0, 1), (0, 2)]
    """
list with tuples.
list with tuples .
stencil
list
flattend list of rel. coord.
flattend list of rel . coord .
ndims
int