File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -847,12 +847,8 @@ def interval_contains_open(interval, val):
847
847
# assert (tpoints1 == tpoints2).all()
848
848
849
849
# Here are some timing tests
850
- points = [(random (), random ()) for i in xrange (10000 )]
850
+ points = npy . asarray ( [(random (), random ()) for i in xrange (10000 )])
851
851
t = timeit .Timer ("trans_sum(points)" , "from __main__ import trans_sum, points" )
852
- print "Time to transform 10000 x 10 points as tuples:" , t .timeit (10 )
853
-
854
- points2 = npy .asarray (points )
855
- t = timeit .Timer ("trans_sum(points2)" , "from __main__ import trans_sum, points2" )
856
- print "Time to transform 10000 x 10 points as numpy array:" , t .timeit (10 )
852
+ print "Time to transform 10000 x 10 points:" , t .timeit (10 )
857
853
858
854
__all__ = ['Transform' , 'Affine2D' ]
You can’t perform that action at this time.
0 commit comments