[Scipy-svn] r4548 - trunk/scipy/ndimage

scipy-svn at scipy.org scipy-svn at scipy.org
Thu Jul 17 08:50:18 EDT 2008


Author: stefan
Date: 2008-07-17 07:50:08 -0500 (Thu, 17 Jul 2008)
New Revision: 4548

Modified:
   trunk/scipy/ndimage/filters.py
Log:
Fix typo in filters.py [spotted by Michael Fitzgerald].


Modified: trunk/scipy/ndimage/filters.py
===================================================================
--- trunk/scipy/ndimage/filters.py	2008-07-16 22:10:40 UTC (rev 4547)
+++ trunk/scipy/ndimage/filters.py	2008-07-17 12:50:08 UTC (rev 4548)
@@ -63,7 +63,7 @@
     if numpy.iscomplexobj(input):
         raise TypeError, 'Complex type not supported'
     output, return_value = _ni_support._get_output(output, input)
-    weights = numpy.asarray(weights, dtype = numpy.float64)
+    weights = numpy.asarray(weights, dtype=numpy.float64)
     if weights.ndim != 1 or weights.shape[0] < 1:
         raise RuntimeError, 'no filter weights given'
     if not weights.flags.contiguous:
@@ -332,7 +332,7 @@
     if numpy.iscomplexobj(int):
         raise TypeError, 'Complex type not supported'
     origins = _ni_support._normalize_sequence(origin, input.ndim)
-    weights = numpy.asarray(weights, dtype = numpy.float64)
+    weights = numpy.asarray(weights, dtype=numpy.float64)
     wshape = [ii for ii in weights.shape if ii > 0]
     if len(wshape) != input.ndim:
         raise RuntimeError, 'filter weights array has incorrect shape.'
@@ -492,7 +492,7 @@
             else:
                 separable = False
     else:
-        structure = numpy.asarray(structure, dtype = numpy.float64)
+        structure = numpy.asarray(structure, dtype=numpy.float64)
         separable = False
         if footprint is None:
             footprint = numpy.ones(structure.shape, bool)
@@ -573,9 +573,9 @@
         if size is None:
             raise RuntimeError, "no footprint or filter size provided"
         sizes = _ni_support._normalize_sequence(size, input.ndim)
-        footprint = numpy.ones(sizes, dtype = bool)
+        footprint = numpy.ones(sizes, dtype=bool)
     else:
-        footprint = numpy.asarray(footprint, dtype = bool)
+        footprint = numpy.asarray(footprint, dtype=bool)
     fshape = [ii for ii in footprint.shape if ii > 0]
     if len(fshape) != input.ndim:
         raise RuntimeError, 'filter footprint array has incorrect shape.'
@@ -709,7 +709,7 @@
         if size is None:
             raise RuntimeError, "no footprint or filter size provided"
         sizes = _ni_support._normalize_sequence(size, input.ndim)
-        footprint = numpy.ones(size, dtype = bool)
+        footprint = numpy.ones(sizes, dtype=bool)
     else:
         footprint = numpy.asarray(footprint)
         footprint = footprint.astype(bool)




More information about the Scipy-svn mailing list