[Scipy-svn] r6696 - trunk/scipy/interpolate

scipy-svn@scip... scipy-svn@scip...
Fri Sep 10 09:26:53 CDT 2010


Author: ptvirtan
Date: 2010-09-10 09:26:53 -0500 (Fri, 10 Sep 2010)
New Revision: 6696

Modified:
   trunk/scipy/interpolate/interpnd.pyx
Log:
ENH: interpolate/interpnd: make the interpolators automatically broadcast input arrays appropriately

Modified: trunk/scipy/interpolate/interpnd.pyx
===================================================================
--- trunk/scipy/interpolate/interpnd.pyx	2010-09-09 17:32:11 UTC (rev 6695)
+++ trunk/scipy/interpolate/interpnd.pyx	2010-09-10 14:26:53 UTC (rev 6696)
@@ -143,7 +143,7 @@
     """
     if (isinstance(points, tuple) or isinstance(points, list)) \
            and points and isinstance(points[0], np.ndarray):
-        p = map(np.asanyarray, points)
+        p = np.broadcast_arrays(*points)
         for j in xrange(1, len(p)):
             if p[j].shape != p[0].shape:
                 raise ValueError("coordinate arrays do not have the same shape")



More information about the Scipy-svn mailing list