提交 e368f587 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix comparison code in __eq__ for Boolean scalar ops

上级 f469225a
......@@ -1188,7 +1188,7 @@ class LogicalComparison(BinaryScalarOp):
def __eq__(self, other):
return (BinaryScalarOp.__eq__(self, other) and
getattr(self, 'bool', False) == getattr(self, 'bool', False))
getattr(self, 'bool', False) == getattr(other, 'bool', False))
def __hash__(self):
# bool should always be True
......@@ -1220,7 +1220,7 @@ class FixedLogicalComparison(UnaryScalarOp):
def __eq__(self, other):
return (UnaryScalarOp.__eq__(self, other) and
getattr(self, 'bool', False) == getattr(self, 'bool', False))
getattr(self, 'bool', False) == getattr(other, 'bool', False))
def __hash__(self):
# bool should always be True
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论