From 4e8aa43beb5c2962d5ef5ea7c6f52ea783bee26f Mon Sep 17 00:00:00 2001 From: Yann in 't Veld Date: Wed, 13 Sep 2023 17:14:21 +0200 Subject: [PATCH] [bug] broken Pade on DLR Gfs --- python/triqs_tprf/lattice_utils.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/python/triqs_tprf/lattice_utils.py b/python/triqs_tprf/lattice_utils.py index 65399ee6..794e92dd 100644 --- a/python/triqs_tprf/lattice_utils.py +++ b/python/triqs_tprf/lattice_utils.py @@ -559,14 +559,20 @@ def pade_analytical_continuation_wk( for k in kmesh: g_f = g_fk[:, k] - g_w = g_wk[:, k] + + # Make_gf_dlr is broken on gf views (issue #913), + # so make a copy of the data instead + if type(wmesh) == MeshDLRImFreq: + g_w = Gf(mesh=wmesh, target_shape=g_wk.target_shape) + g_w.data[:] = g_wk[:, k].data[:] + else: + g_w = g_wk[:, k] if len(g_wk.target_shape) == 4: g_w = gf_tensor_to_matrix(g_w) g_f = gf_tensor_to_matrix(g_f) if type(g_w.mesh) == MeshDLRImFreq: - g_c = make_gf_dlr(g_w) small_mesh = MeshImFreq(g_w.mesh.beta, g_w.mesh.statistic, n_points) g_w = dlr_on_imfreq(g_c, small_mesh)