clean_community_indexes¶
- clean_community_indexes(communityID)[source]¶
Takes input of community assignments. Returns reindexed community assignment by using smallest numbers possible.
- Parameters:
communityID (array-like) – list or array of integers. Output from community detection algorithems.
- Returns:
new_communityID – cleaned list going from 0 to len(np.unique(communityID))-1
- Return type:
array
Note
Behaviour of funciton entails that the lowest community integer in communityID will recieve the lowest integer in new_communityID.