|
From: <mme...@us...> - 2008-07-30 12:41:07
|
Revision: 5927
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5927&view=rev
Author: mmetz_bn
Date: 2008-07-30 12:41:04 +0000 (Wed, 30 Jul 2008)
Log Message:
-----------
use xrange instead of range in hexbin
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2008-07-29 21:42:37 UTC (rev 5926)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2008-07-30 12:41:04 UTC (rev 5927)
@@ -5120,7 +5120,7 @@
lattice1.shape = (nx1,ny1)
lattice2.shape = (nx2,ny2)
- for i in range(len(x)):
+ for i in xrange(len(x)):
if bdist[i]:
lattice1[ix1[i], iy1[i]]+=1
else:
@@ -5128,29 +5128,29 @@
else:
# create accumulation arrays
lattice1 = np.empty((nx1,ny1),dtype=object)
- for i in range(nx1):
- for j in range(ny1):
+ for i in xrange(nx1):
+ for j in xrange(ny1):
lattice1[i,j] = []
lattice2 = np.empty((nx2,ny2),dtype=object)
- for i in range(nx2):
- for j in range(ny2):
+ for i in xrange(nx2):
+ for j in xrange(ny2):
lattice2[i,j] = []
- for i in range(len(x)):
+ for i in xrange(len(x)):
if bdist[i]:
lattice1[ix1[i], iy1[i]].append( C[i] )
else:
lattice2[ix2[i], iy2[i]].append( C[i] )
- for i in range(nx1):
- for j in range(ny1):
+ for i in xrange(nx1):
+ for j in xrange(ny1):
vals = lattice1[i,j]
if len(vals):
lattice1[i,j] = reduce_C_function( vals )
else:
lattice1[i,j] = np.nan
- for i in range(nx2):
- for j in range(ny2):
+ for i in xrange(nx2):
+ for j in xrange(ny2):
vals = lattice2[i,j]
if len(vals):
lattice2[i,j] = reduce_C_function( vals )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|