From c9259f7f20122e2d2c11c96cf72b91806099035c Mon Sep 17 00:00:00 2001 From: Alexander Hampel Date: Fri, 22 Mar 2024 14:12:26 -0400 Subject: [PATCH] [fix] broken FS: np.shape -> len np.shape behaved behavior for inhomogenous list of lists and crashes in newer versions --- python/solid_dmft/postprocessing/plot_correlated_bands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/solid_dmft/postprocessing/plot_correlated_bands.py b/python/solid_dmft/postprocessing/plot_correlated_bands.py index 0b360dad..ba13af90 100644 --- a/python/solid_dmft/postprocessing/plot_correlated_bands.py +++ b/python/solid_dmft/postprocessing/plot_correlated_bands.py @@ -481,7 +481,7 @@ def get_kx_ky_FS(lower_right, upper_left, Z, tb, select=None, N_kxy=10, kz=0.0, sheet_ct = 0 for sheet in contours.keys(): - for sec_per_sheet in range(np.shape(contours[sheet])[0]): + for sec_per_sheet in range(len(contours[sheet])): # once on 2D cubic mesh FS_kx_ky[sheet_ct] = np.vstack([_fract_ind_to_val(kx, contours[sheet][sec_per_sheet][:, 0]), _fract_ind_to_val(ky, contours[sheet][sec_per_sheet][:, 1]),