def get_local(positions, sequence, i):
    """
    Get a local slice of positions and sequence around i
    :param positions: The positions along the superhelical in floating index "units"
    :param sequence: The sequence of the superhelical DNA
    :param i: The position at which to slice
    :return: A slice of 2 or 3 positions, the 2 or 3 long sequence, the local index of the element to mutate.
    """
    if i == 0:
        return positions[:2].copy(), sequence[:2].copy(), 0

    elif i == len(positions):
        return positions[-2:].copy(), sequence[-2:].copy(), 1

    else:
        return positions[i - 1:i + 2].copy(), \
               sequence[i - 1:i + 2].copy(), \
               1