Skip to content

Commit 138bf0f

Browse files
committed
Pass dtype to gaussian_2d
1 parent c058df0 commit 138bf0f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/_basis_util.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ def testGaussianExpand(self):
3939
# Want sigma to be as large as possible without the Gaussian
4040
# spilling too much outside the central disk.
4141
sigma = self.L / 8
42-
im1 = gaussian_2d(self.L, x0=x0, y0=y0, sigma_x=sigma, sigma_y=sigma)
43-
im1 = im1.astype(self.dtype)
42+
im1 = gaussian_2d(
43+
self.L, x0=x0, y0=y0, sigma_x=sigma, sigma_y=sigma, dtype=self.dtype
44+
)
4445

4546
coef = self.basis.expand(im1)
4647
im2 = self.basis.evaluate(coef)
@@ -59,8 +60,7 @@ def testGaussianExpand(self):
5960

6061
def testIsotropic(self):
6162
sigma = self.L / 8
62-
im = gaussian_2d(self.L, sigma_x=sigma, sigma_y=sigma)
63-
im = im.astype(self.dtype)
63+
im = gaussian_2d(self.L, sigma_x=sigma, sigma_y=sigma, dtype=self.dtype)
6464

6565
coef = self.basis.expand(im)
6666

@@ -80,8 +80,7 @@ def testModulated(self):
8080
ell = 1
8181

8282
sigma = self.L / 8
83-
im = gaussian_2d(self.L, sigma_x=sigma, sigma_y=sigma)
84-
im = im.astype(self.dtype)
83+
im = gaussian_2d(self.L, sigma_x=sigma, sigma_y=sigma, dtype=self.dtype)
8584

8685
g2d = grid_2d(self.L)
8786

0 commit comments

Comments
 (0)