summaryrefslogtreecommitdiff
path: root/benchmarks/casting.py
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/casting.py')
-rw-r--r--benchmarks/casting.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/benchmarks/casting.py b/benchmarks/casting.py
deleted file mode 100644
index cb498db10..000000000
--- a/benchmarks/casting.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import timeit
-N = [10,10]
-t1 = timeit.Timer('b = a.astype(int)','import numpy;a=numpy.zeros(shape=%s,dtype=float)'%N)
-t2 = timeit.Timer('b = a.astype("l")','import Numeric;a=Numeric.zeros(shape=%s,typecode="d")'%N)
-t3 = timeit.Timer("b = a.astype('l')","import numarray; a=numarray.zeros(shape=%s,typecode='d')"%N)
-print "1-D length = ", N
-print "NumPy: ", t1.repeat(3,1000)
-print "Numeric: ", t2.repeat(3,1000)
-print "Numarray: ", t3.repeat(3,1000)