unique

glue.utils.array.unique(array)[source]

Return the unique elements of the array U, as well as the index array I such that U[I] == array

Parameters:

array : numpy.ndarray

The array to use

Returns:

U : numpy.ndarray

The unique elements of the array

I : numpy.ndarray

The indices such that U[I] == array