@@ -66,7 +66,7 @@ class SymbolicOperator(metaclass=abc.ABCMeta):
6666
6767 @staticmethod
6868 def _issmall (val , tol = EQ_TOLERANCE ):
69- '''Checks whether a value is near- zero
69+ '''Checks whether a value is near zero.
7070
7171 Parses the allowed coefficients above for near-zero tests.
7272
@@ -657,7 +657,7 @@ def isclose(self, other, tol=None, rtol=EQ_TOLERANCE, atol=EQ_TOLERANCE):
657657 a = self .terms [term ]
658658 b = other .terms [term ]
659659 if isinstance (a , sympy .Expr ) or isinstance (b , sympy .Expr ):
660- if self ._issmall (a - b , atol ) is False :
660+ if not self ._issmall (a - b , atol ):
661661 return False
662662 elif not abs (a - b ) <= atol + rtol * max (abs (a ), abs (b )):
663663 return False
@@ -666,14 +666,14 @@ def isclose(self, other, tol=None, rtol=EQ_TOLERANCE, atol=EQ_TOLERANCE):
666666 if term in self .terms :
667667 coeff = self .terms [term ]
668668 if isinstance (coeff , sympy .Expr ):
669- if self ._issmall (coeff , atol ) is False :
669+ if not self ._issmall (coeff , atol ):
670670 return False
671671 elif not abs (coeff ) <= atol :
672672 return False
673673 else :
674674 coeff = other .terms [term ]
675675 if isinstance (coeff , sympy .Expr ):
676- if self ._issmall (coeff , atol ) is False :
676+ if not self ._issmall (coeff , atol ):
677677 return False
678678 elif not abs (coeff ) <= atol :
679679 return False
0 commit comments