Current File : //usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyc
�
E�`Qc@s*ddlmZdefd��YZdS(i����(tTimert	BenchmarkcBs2eZdZdddd�Zd�Zd�ZRS(s)Benchmark a feature in different modules.tii�cCs8td�|D��|_||_||_||_dS(Ncss|]}|dfVqdS(RN((t.0tm((sD/usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pys	<genexpr>s(tdicttmodule_testtrunstrepsttitle(tselftmodulesR	RR((sD/usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyt__init__s		cCsr|\}}|dkr*|jj�}n	|g}x8|D]0}d||f|}t||�|j|<q:WdS(sSet the test code for modules.tallsimport %s; import %s as np; N(RtkeysR(R
tmodulet.2ttest_strt	setup_strRR((sD/usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyt__setitem__s		

cCs�td�|jD��}|jr-|jGHnd|j|jfGHddGHxwt|j�D]f}|j|�}y,d||j|j|j|j�fGHWq[tk
r�}d||fGHq[Xq[WddGHHdS(s+Run the benchmark on the different modules.css|]}t|�VqdS(N(tlen(Rtmod((sD/usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pys	<genexpr>ss!Doing %d runs, each with %d reps.t-iOs%s: %ss%s: Failed to benchmark (%s).N(	tmaxRR	RRtsortedtljusttrepeatt	Exception(R
tmodule_column_lenRtmodnamete((sD/usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pytruns		&	(t__name__t
__module__t__doc__RRR(((sD/usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyRs	N(ttimeitRRR(((sD/usr/lib64/python2.7/site-packages/numpy/lib/benchmarks/benchmark.pyt<module>s