Version 1.0b1 API Documentation generated by Endo 2006-08-14
Set operations for 1D numeric arrays based on sort() function.
Concerning the speed, test_unique1d_speed() reveals that up to 10000000 elements unique1d() is about 10 times faster than the standard dictionary-based numpy.unique().
Limitations: Except unique1d, union1d and intersect1d_nu, all functions expect inputs with unique elements. Speed could be gained in some operations by an implementaion of sort(), that can provide directly the permutation vectors, avoiding thus calls to argsort().
To do: Optionally return indices analogously to unique1d for all functions.
Author: Robert Cimrman
Array difference with prefixed and/or appended value.
Intersection of 1D arrays with unique elements.
Intersection of 1D arrays with any elements.
Set difference of 1D arrays with unique elements.
Return an array of shape of ar1 containing 1 where the elements of ar1 are in ar2 and 0 otherwise.
Set exclusive-or of 1D arrays with unique elements.
Union of 1D arrays with unique elements.
Unique elements of 1D array. When ret_indx is True, return also the indices indx such that ar1.flat[indx] is the resulting array of unique elements.
| Local name | Refers to |
|---|---|
| numpy | numpy |
| time | time |