diff --git a/src/_pytest/python_api.py b/src/_pytest/python_api.py index d88d1c88b..f35351e2a 100644 --- a/src/_pytest/python_api.py +++ b/src/_pytest/python_api.py @@ -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: