Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6494ec5 commit 9bca927Copy full SHA for 9bca927
1 file changed
lib/matplotlib/affine.py
@@ -847,12 +847,8 @@ def interval_contains_open(interval, val):
847
# assert (tpoints1 == tpoints2).all()
848
849
# Here are some timing tests
850
- points = [(random(), random()) for i in xrange(10000)]
+ points = npy.asarray([(random(), random()) for i in xrange(10000)])
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)
+ print "Time to transform 10000 x 10 points:", t.timeit(10)
857
858
__all__ = ['Transform', 'Affine2D']
0 commit comments