#NEWLINE# def reindex_adjacency_array( adjacency_array ) : #NEWLINE# #INDENT# remap_vector = np . arange ( ( np . max ( adjacency_array ) + 1 ) ) #NEWLINE# unique_values = np . unique ( adjacency_array ) #NEWLINE# remap_vector [ unique_values ] = np . arange ( adjacency_array . shape [ 0 ] ) #NEWLINE# return remap_vector [ adjacency_array ]