def get_indices(arr, axis):
    """
    Generate the indices. split the array along axis.
    Include the divisible integer or a 1-D array of sorted integers.
    """
    indices_arr = []
    axis_size = arr.shape[axis]
    even_div = 1
    random_integer = np.random.randint(1, 10)

    if axis_size == 1:
        indices_arr.append(1)  # in index

    elif axis_size > 1:
        for div in range(2, int(math.sqrt(axis_size) + 1)):
            if axis_size % div == 0:
                indices_arr.append(div)  # add divisible integer
                even_div = div

        # add 1 and axis_size
        indices_arr.append(1)
        indices_arr.append(axis_size)

    # an index in the dimension of the array along axis
    indices_arr.append(list(range(1, axis_size, even_div)))

    # an index exceeds the dimension of the array along axis
    indices_arr.append(
        list(range(0, axis_size + even_div * random_integer, even_div))
    )
    indices_arr.append(
        list(range(axis_size + even_div * random_integer, 0, -even_div))
    )

    return indices_arr

    Generate the indices. split the array along axis.
    Include the divisible integer or a 1-D array of sorted integers.
    
tests/integration/test_split.py