From a8d86fd1989af675c8b2dbdd6a61284a3a2c9631 Mon Sep 17 00:00:00 2001 From: "Gernot J. Kraberger" Date: Tue, 27 Feb 2018 18:59:01 +0100 Subject: [PATCH] BlockStructure: fix bug with bool comparison --- python/block_structure.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/block_structure.py b/python/block_structure.py index 2dcd7c81..f1501409 100644 --- a/python/block_structure.py +++ b/python/block_structure.py @@ -366,7 +366,8 @@ class BlockStructure(object): def __eq__(self,other): def compare(one,two): if type(one)!=type(two): - return False + if not (isinstance(one, (bool, np.bool_)) and isinstance(two, (bool, np.bool_))): + return False if one is None and two is None: return True if isinstance(one,list) or isinstance(one,tuple):