summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2006-07-12 08:36:01 +0000
committerStefan van der Walt <stefan@sun.ac.za>2006-07-12 08:36:01 +0000
commit27c212bf3d4bbd180c60149e178047c2e49a5648 (patch)
tree0debe5cc658776d0543d2aca6b0518f69b9cd032 /benchmarks
parentcadbb5f2ec84cb774023bbe8cbe6f39a93e837d7 (diff)
downloadpython-numpy-27c212bf3d4bbd180c60149e178047c2e49a5648.tar.gz
python-numpy-27c212bf3d4bbd180c60149e178047c2e49a5648.tar.bz2
python-numpy-27c212bf3d4bbd180c60149e178047c2e49a5648.zip
Change occurrences of N.rand to N.random.rand.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/simpleindex.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/benchmarks/simpleindex.py b/benchmarks/simpleindex.py
index 07c57f506..462fad536 100644
--- a/benchmarks/simpleindex.py
+++ b/benchmarks/simpleindex.py
@@ -27,12 +27,12 @@ for k in xrange(%d):
for l in xrange(%d):
a[k][l] = random.random()
""" % (N,N,N,N)
-t1 = timeit.Timer(code, 'import numpy as N; a = N.rand(%d,%d)' % (N,N))
+t1 = timeit.Timer(code, 'import numpy as N; a = N.random.rand(%d,%d)' % (N,N))
t2 = timeit.Timer(code, 'import MLab as N; a=N.rand(%d,%d)' % (N,N))
-t3 = timeit.Timer(code, 'import numarray.mlab as N; a=N.rand(%d,%d)' % (N,N))
-t4 = timeit.Timer(code2, 'import numpy as N; a = N.rand(%d,%d)' % (N,N))
+t3 = timeit.Timer(code, 'import numarray.mlab as N; a=N.random.rand(%d,%d)' % (N,N))
+t4 = timeit.Timer(code2, 'import numpy as N; a = N.random.rand(%d,%d)' % (N,N))
t5 = timeit.Timer(code3, setup3)
-t6 = timeit.Timer("res = a + a.transpose()","import numpy as N; a=N.rand(%d,%d)" % (N,N))
+t6 = timeit.Timer("res = a + a.transpose()","import numpy as N; a=N.random.rand(%d,%d)" % (N,N))
print "shape = ", (N,N)
print "NumPy 1: ", t1.repeat(3,100)
print "NumPy 2: ", t4.repeat(3,100)