From f26c9834a647dd2d82768954824fecbe0ec74531 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Fri, 26 May 2017 12:06:25 -0700 Subject: [PATCH] Toys: Fix OneOnBallPotential --- sumpy/toys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sumpy/toys.py b/sumpy/toys.py index 64431538..512dc3a1 100644 --- a/sumpy/toys.py +++ b/sumpy/toys.py @@ -272,7 +272,7 @@ class OneOnBallPotential(PotentialSource): def eval(self, targets): dist_vec = targets - self.center[:, np.newaxis] - return (np.sum(dist_vec**2, axis=0) < self.radius).astype(np.float64) + return (np.sum(dist_vec**2, axis=0) < self.radius**2).astype(np.float64) class PointSources(PotentialSource): -- GitLab