From 3f122d6862ce2fb4e3813987314fc0445ce9d1b9 Mon Sep 17 00:00:00 2001 From: gnrraphi Date: Mon, 11 Dec 2023 09:00:16 +0100 Subject: [PATCH] fix inverse_phat_square --- lib/gpt/algorithms/optimize/fourier_accelerate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gpt/algorithms/optimize/fourier_accelerate.py b/lib/gpt/algorithms/optimize/fourier_accelerate.py index 7b24b42a..66d7aa7a 100644 --- a/lib/gpt/algorithms/optimize/fourier_accelerate.py +++ b/lib/gpt/algorithms/optimize/fourier_accelerate.py @@ -44,7 +44,7 @@ def __init__(self, grid, base, dimensions=None): self.weight += c_mu_l # special consideration for zero - self.weight[coor[0:1]] = (2.0 * np.pi) ** 2.0 / np.prod( + self.weight[[[0] * grid.nd]] = (2.0 * np.pi) ** 2.0 / np.prod( [grid.gdimensions[mu] for mu in dimensions] ) ** (2.0 / len(dimensions))