3
0
mirror of https://github.com/triqs/dft_tools synced 2024-12-25 05:43:40 +01:00

BlockStructure: fix bug with bool comparison

This commit is contained in:
Gernot J. Kraberger 2018-02-27 18:59:01 +01:00
parent 3dbc360173
commit a8d86fd198

View File

@ -366,6 +366,7 @@ class BlockStructure(object):
def __eq__(self,other): def __eq__(self,other):
def compare(one,two): def compare(one,two):
if type(one)!=type(two): if type(one)!=type(two):
if not (isinstance(one, (bool, np.bool_)) and isinstance(two, (bool, np.bool_))):
return False return False
if one is None and two is None: if one is None and two is None:
return True return True