def normalize_1d_index(index):
    """
    Normalize the *index* type (an integer or slice) for indexing a 1D
    sequence.
    """
    if isinstance(index, types.SliceType):
        return index

    elif isinstance(index, types.Integer):
        return types.intp if index.signed else types.uintp

    Normalize the *index* type (an integer or slice) for indexing a 1D
    sequence.
    
numba/core/typing/old_builtins.py