bugfix in ApproxNumpy initialisation, use keywords for arguments now

This commit is contained in:
Alan 2018-07-18 17:29:55 -04:00
parent 9720c3301a
commit 7bff5866b1
1 changed files with 4 additions and 1 deletions

View File

@ -211,7 +211,10 @@ class ApproxScalar(ApproxBase):
the pre-specified tolerance.
"""
if _is_numpy_array(actual):
return ApproxNumpy(actual, self.abs, self.rel, self.nan_ok) == self.expected
return (
ApproxNumpy(actual, rel=self.rel, abs=self.abs, nan_ok=self.nan_ok)
== self.expected
)
# Short-circuit exact equality.
if actual == self.expected: