Files
congress-legislators/scripts/build/numpy/benchmarks/creating.py
bchartoff 0cf2f340f9 updated ICPSR id's
pulled and matched ICPSR id's from roll call source data
2013-07-25 17:11:31 -04:00

15 lines
411 B
Python

from benchmark import Benchmark
modules = ['numpy','Numeric','numarray']
N = [10,10]
b = Benchmark(modules,
title='Creating %s zeros.' % N,
runs=3,reps=10000)
b['numpy'] = ('a=np.zeros(shape,type)', 'shape=%s;type=float' % N)
b['Numeric'] = ('a=np.zeros(shape,type)', 'shape=%s;type=np.Float' % N)
b['numarray'] = ('a=np.zeros(shape,type)', "shape=%s;type=np.Float" % N)
b.run()