[Scipy-svn] r2247 - trunk/Lib/interpolate
scipy-svn at scipy.org
scipy-svn at scipy.org
Sat Oct 7 22:12:20 EDT 2006
Author: stefan
Date: 2006-10-07 21:12:06 -0500 (Sat, 07 Oct 2006)
New Revision: 2247
Modified:
trunk/Lib/interpolate/interpolate.py
Log:
More concise rank checking in interp2d.
Modified: trunk/Lib/interpolate/interpolate.py
===================================================================
--- trunk/Lib/interpolate/interpolate.py 2006-10-07 16:22:48 UTC (rev 2246)
+++ trunk/Lib/interpolate/interpolate.py 2006-10-08 02:12:06 UTC (rev 2247)
@@ -71,7 +71,7 @@
"""
self.x, self.y, self.z = map(ravel, map(array, [x, y, z]))
- if not (rank(self.x) == 1 and rank(self.y) == 1 and rank(self.z) == 1):
+ if not map(rank, [self.x, self.y, self.z]) == [1,1,1]:
raise ValueError("One of the input arrays is not 1-d.")
if len(self.x) != len(self.y):
raise ValueError("x and y must have equal lengths")
More information about the Scipy-svn
mailing list