I am using **isin()** function to find the indices of a set of elements in a Numpy array, but it returns an empty list, although those elements are present in the array.

Here is my sample code:

>>> import numpy as np

>>> a=np.array([11,12,13,14,15,16,17])

>>> b=set([13,17,11])

>>> np.isin(a,b)

array([False, False, False, False, False, False, False])

>>> np.isin(a,b).nonzero()

(array([], dtype=int64),)