[Scipy-svn] r6742 - trunk/scipy/ndimage/tests
scipy-svn at scipy.org
scipy-svn at scipy.org
Sat Sep 11 20:56:02 EDT 2010
Author: ptvirtan
Date: 2010-09-11 19:56:01 -0500 (Sat, 11 Sep 2010)
New Revision: 6742
Modified:
trunk/scipy/ndimage/tests/test_ndimage.py
Log:
3K: ndimage: fix another 2to3 clash with filter keyword
Modified: trunk/scipy/ndimage/tests/test_ndimage.py
===================================================================
--- trunk/scipy/ndimage/tests/test_ndimage.py 2010-09-12 00:55:48 UTC (rev 6741)
+++ trunk/scipy/ndimage/tests/test_ndimage.py 2010-09-12 00:56:01 UTC (rev 6742)
@@ -1138,7 +1138,7 @@
def test_generic_filter01(self):
"generic filter 1"
- filter = numpy.array([[1.0, 2.0], [3.0, 4.0]])
+ filter_ = numpy.array([[1.0, 2.0], [3.0, 4.0]])
footprint = numpy.array([[1, 0], [0, 1]])
cf = numpy.array([1., 4.])
def _filter_func(buffer, weights, total = 1.0):
@@ -1147,7 +1147,7 @@
for type in self.types:
a = numpy.arange(12, dtype = type)
a.shape = (3,4)
- r1 = ndimage.correlate(a, filter * footprint) / 5
+ r1 = ndimage.correlate(a, filter_ * footprint) / 5
r2 = ndimage.generic_filter(a, _filter_func,
footprint = footprint, extra_arguments = (cf,),
extra_keywords = {'total': cf.sum()})
More information about the Scipy-svn
mailing list