Set Functions

Array API specification for creating and operating on sets.

A conforming implementation of the array API standard must provide and support the following functions.

Objects in API

isin(x1, x2, /, *, invert=False)

Tests for each element in x1 whether the element is in x2.

unique_all(x, /)

Returns the unique elements of an input array x, the first occurring indices for each unique element in x, the indices from the set of unique elements that reconstruct x, and the corresponding counts for each unique element in x.

unique_counts(x, /)

Returns the unique elements of an input array x and the corresponding counts for each unique element in x.

unique_inverse(x, /)

Returns the unique elements of an input array x and the indices from the set of unique elements that reconstruct x.

unique_values(x, /)

Returns the unique elements of an input array x.