Robert Cimrman wrote: > Robert Kern wrote: >> Jan Strube wrote: >>> I would also like to see a method that doesn't have the unique members >>> requirement. >>> If setmember1d cannot be modified to do that, is there another method >>> that doesn't have these restrictions. Or could one be added? >> If you can write one that's reasonably efficient, yes. > > Or you could just call unique1d prior to your call to setmember1d - it > was meant to be used that way... you would not loose much speed that > way, IMHO.
But that doesn't do what they want. They want a function that gives the mask against their original array of the elements that are in the other array. The result of setmember1d(unique1d(ar1), unique1d(ar2)) is a mask against unique1d(ar1) not ar1 as they want. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion