From: Robert C. <cim...@nt...> - 2006-07-04 09:51:23
|
David Huard wrote: > Here is a quick benchmark between numpy's unique, unique1d and sasha's > unique: > > x = rand(100000)*100 > x = x.astype('i') > > %timeit unique(x) > 10 loops, best of 3: 525 ms per loop > > %timeit unique_sasha(x) > 100 loops, best of 3: 10.7 ms per loop > > timeit unique1d(x) > 100 loops, best of 3: 12.6 ms per loop > > So I wonder what is the added value of unique? > Could unique1d simply become unique ? It looks like unique1d and friends could use same facelifting with new numpy features like boolean indexing :) r. |