Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy get index of list of values

>>> master = np.array([1,2,3,4,5])
>>> search = np.array([4,2,2,3])
>>> np.searchsorted(master, search)
array([3, 1, 1, 2])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #index #list #values
ADD COMMENT
Topic
Name
6+8 =