Document evaluating complex number for infinity

This commit is contained in:
Anton Lodder
2019-10-25 12:03:03 -04:00
parent 34a02121ad
commit 3c7fbe2d8b

View File

@@ -227,7 +227,7 @@ class ApproxScalar(ApproxBase):
"""
# Infinities aren't compared using tolerances, so don't show a
# tolerance.
# tolerance. Need to call abs to handle complex numbers, e.g. (inf + 1j)
if math.isinf(abs(self.expected)):
return str(self.expected)