Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python find indexes of unique elements of a list

import numpy as np
np.unique([1,6,6,2,2,3,4,5,5,5], return_index=True)

>>> (array([1, 2, 3, 4, 5, 6]), array([0, 3, 5, 6, 7, 1], dtype=int64))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #find #indexes #unique #elements #list
ADD COMMENT
Topic
Name
4+2 =