From f8c543b94e615070623ff12d2b4c31e969503853 Mon Sep 17 00:00:00 2001 From: "per.andreas.brodtkorb" Date: Wed, 1 Dec 2010 06:32:48 +0000 Subject: [PATCH] updated kdetools.py --- pywafo/src/wafo/kdetools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pywafo/src/wafo/kdetools.py b/pywafo/src/wafo/kdetools.py index a289a81..65dfbdd 100644 --- a/pywafo/src/wafo/kdetools.py +++ b/pywafo/src/wafo/kdetools.py @@ -248,9 +248,9 @@ class TKDE(object): pdf = interpolate.interp1d(points[0],f, bounds_error=False, fill_value=0.0) elif self.d==2: pdf = interpolate.interp2d(points[0],points[1], f, bounds_error=False, fill_value=0.0) - ipoints = meshgrid(*args) if self.d>1 else args - fi = pdf(*ipoints) - fi.shape = ipoints[0].shape + #ipoints = meshgrid(*args) if self.d>1 else args + fi = pdf(*args) + #fi.shape = ipoints[0].shape return fi return f def eval_grid(self, *args): @@ -431,7 +431,7 @@ class KDE(object): h = np.atleast_1d(h) hsiz = h.shape - if (min(hsiz) == 1) or (self.d == 1): + if (len(hsiz) == 1) or (self.d == 1): if max(hsiz) == 1: h = h * np.ones(self.d) else: