def convert_neg(arr, size):
    """
    Convert any negative indices into their positive equivalent.

    This only works for a 1D array.

    Parameters
    ----------
    arr : ndarray
        Array having negative indices converted.
    size : int
        Dimension of the array.

    Returns
    -------
    ndarray
        The converted array.
    """
    arr[arr < 0] += size
    return arr