Set operations for arrays based on sorting.
For floating point arrays, inaccurate results may appear due to usual round-off and floating point comparison issues.
Speed could be gained in some operations by an implementation of
numpy.sort, that can provide directly the permutation vectors, thus avoiding
Original author: Robert Cimrman