Ñò
Kc @ sP d d k Z d d k Z d d k Te d „ Z e d j o e d e ƒ n d S( iÿÿÿÿN( t *c
së t i d d d ƒ } g } g } g } g } xA| D]9} d | } d | GHt i | d t i i | ƒ ƒ } d GHt i ƒ } t i | ƒ }
t i ƒ | } | GHd GHt i ƒ } t | ƒ } t i ƒ | }
|
GH| d j o
d } n |
| } d
G| GHd t |
ƒ t | ƒ f GH| i | ƒ | i | ƒ | i | ƒ | i |
ƒ t i
|
| j ƒ p t ‚ q4 W| GH| GH| GH| GH| o[ d d k ‰ ‡ f d
† } | d ˆ i
| | | ƒ | d ˆ i | | | ƒ ˆ i ƒ n d S( Ni i i i
s using %d items:s unique:s unique1d:g:Œ0âŽyE>t NDs ratio:s nUnique: %d == %d
iÿÿÿÿc sp ˆ i | ƒ | | | d d d d d ƒ| | | d d d d d ƒˆ i d ƒ ˆ i d ƒ ˆ i d
ƒ d S( Ns g-ot linewidthi t
markersizei s b-xt uniquet unique1dt nItems time [s]( s uniques unique1d( t figuret legendt xlabelt ylabel( t figt funt nItemst dt1st dt2s( t pylab( sL /usr/lib64/python2.6/site-packages/numpy/lib/benchmarks/bench_arraysetops.pyt plotMe4 s
i ( t npt linspacet fixt randomt timet clockR R t lent appendt alltruet AssertionErrorR t loglogt plott show( t plot_resultst exponentst ratiosR
R R t iiR t at ttt bt dt1t ct dt2t ratioR ( ( R sL /usr/lib64/python2.6/site-packages/numpy/lib/benchmarks/bench_arraysetops.pyt bench_unique1d sP
#
!t __main__R ( t numpyR R t numpy.lib.arraysetopst FalseR* t __name__t True( ( ( sL /usr/lib64/python2.6/site-packages/numpy/lib/benchmarks/bench_arraysetops.pyt