3
0
mirror of https://github.com/triqs/dft_tools synced 2024-08-16 09:18:28 +02:00

Bugfix in Blockstructure Test

This commit is contained in:
Hermann Ulrich Schnait 2019-06-04 16:48:23 +02:00 committed by Hermann Schnait
parent 1705e5268f
commit 51275c772d

View File

@ -439,8 +439,8 @@ class BlockStructure(object):
# adapt deg_shells # adapt deg_shells
if self.deg_shells is not None: if self.deg_shells is not None:
for degsh in self.deg_shells[ish]: for degsh in self.deg_shells[ish]:
for key in degsh.keys(): if isinstance(degsh, dict):
if isinstance(degsh, dict): for key in degsh.keys():
if not key in gf_struct: if not key in gf_struct:
del degsh[key] del degsh[key]
continue continue
@ -450,7 +450,8 @@ class BlockStructure(object):
v[gf_struct[key], :][:, gf_struct[key]] v[gf_struct[key], :][:, gf_struct[key]]
warn( warn(
'Removing shells from degenerate shell {}. Cannot guarantee that they continue to be equivalent.') 'Removing shells from degenerate shell {}. Cannot guarantee that they continue to be equivalent.')
else: else: # degshell is list
for key in degsh:
if not key in gf_struct: if not key in gf_struct:
degsh.remove(key) degsh.remove(key)
continue continue