Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

return position of a unique value in python array

def partition(array):
  return {i: (array == i).nonzero()[0] for i in np.unique(array)}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #position #unique #python #array
ADD COMMENT
Topic
Name
6+4 =