Set routines

Making proper sets

methoddescription
uniqueopen in new window(ar[, return_index, return_inverse, …])Find the unique elements of an array.

Boolean operations

methoddescription
in1dopen in new window(ar1, ar2[, assume_unique, invert])Test whether each element of a 1-D array is also present in a second array.
intersect1dopen in new window(ar1, ar2[, assume_unique, …])Find the intersection of two arrays.
isinopen in new window(element, test_elements[, …])Calculates element in test_elements, broadcasting over element only.
setdiff1dopen in new window(ar1, ar2[, assume_unique])Find the set difference of two arrays.
setxor1dopen in new window(ar1, ar2[, assume_unique])Find the set exclusive-or of two arrays.
union1dopen in new window(ar1, ar2)Find the union of two arrays.