drop the duplicate approx call
update test to include both np.array(actual) and np.array(expected)
This commit is contained in:
@@ -211,10 +211,9 @@ class ApproxScalar(ApproxBase):
|
||||
the pre-specified tolerance.
|
||||
"""
|
||||
if _is_numpy_array(actual):
|
||||
return (
|
||||
ApproxNumpy(actual, rel=self.rel, abs=self.abs, nan_ok=self.nan_ok)
|
||||
== self.expected
|
||||
)
|
||||
import numpy as np
|
||||
|
||||
return np.all(abs(self.expected - actual) <= self.tolerance)
|
||||
|
||||
# Short-circuit exact equality.
|
||||
if actual == self.expected:
|
||||
|
||||
Reference in New Issue
Block a user