Set routines#

Making proper sets#

unique(ar[, return_index, return_inverse, ...])

Find the unique elements of an array.

unique_all(x, /)

Find unique values and their indices, inverse indices, and counts.

unique_counts(x, /)

Find unique values and their occurrence counts.

unique_inverse(x, /)

Find unique values and the indices needed to reconstruct the input.

unique_values(x, /)

Find the unique values in an array.

in1d(ar1, ar2[, assume_unique, invert, kind])

Test whether each element of this 1-D array is also present in a second array.

isin(element, test_elements[, ...])

Calculates element in test_elements, broadcasting over element only.