[Scipy-svn] r2883 - trunk/Lib/ndimage/src

scipy-svn@scip... scipy-svn@scip...
Wed Mar 28 12:39:57 CDT 2007


Author: stefan
Date: 2007-03-28 12:39:40 -0500 (Wed, 28 Mar 2007)
New Revision: 2883

Modified:
   trunk/Lib/ndimage/src/ni_interpolation.c
Log:
Fix boundary condition.


Modified: trunk/Lib/ndimage/src/ni_interpolation.c
===================================================================
--- trunk/Lib/ndimage/src/ni_interpolation.c	2007-03-28 16:45:03 UTC (rev 2882)
+++ trunk/Lib/ndimage/src/ni_interpolation.c	2007-03-28 17:39:40 UTC (rev 2883)
@@ -130,7 +130,7 @@
       if (len <= 1) {
         in = 0;
       } else {
-        maybelong sz2 = 2 * len;
+        maybelong sz2 = 2 * len - 1;
         if (in < -sz2)
           in = sz2 * (maybelong)(-in / sz2) + in;
         in = in < -len ? in + sz2 : -in - 1;



More information about the Scipy-svn mailing list