numpy.unique()

numpy.unique

numpy.unique(ar, return_index=False, return_inverse=False, return_counts=False) [source]

Find the unique elements of an array.

Returns the sorted unique elements of an array. There are three optional outputs in addition to the unique elements: the indices of the input array that give the unique values, the indices of the unique array that reconstruct the input array, and the number of times each unique value comes up in the input array.

Parameters:

ar