@jit(nopython=True)
def find_first(item, vec):
    """return the index of the first occurence of item in vec"""
for i in range(len(vec)):
    if item == vec[i]:
        return i
return -1
Numpy: find first index of value fast