is_unique

is_unique(arr: ndarray) bool[source][source]

Check if an array is unique.

Parameters:

arr (np.ndarray) – The array to check.

Returns:

Whether the array is unique.

Return type:

bool

Examples

>>> is_unique(np.array([1, 2, 3]))
True
>>> is_unique(np.array([1, 2, 2]))
False