diff --git a/xarray/core/duck_array_ops.py b/xarray/core/duck_array_ops.py index bbf358ff48b..b9985bc9260 100644 --- a/xarray/core/duck_array_ops.py +++ b/xarray/core/duck_array_ops.py @@ -317,7 +317,9 @@ def allclose_or_equiv(arr1, arr2, rtol=1e-5, atol=1e-8): if lazy_equiv is None: with warnings.catch_warnings(): warnings.filterwarnings("ignore", r"All-NaN (slice|axis) encountered") - return bool(array_all(isclose(arr1, arr2, rtol=rtol, atol=atol, equal_nan=True))) + return bool( + array_all(isclose(arr1, arr2, rtol=rtol, atol=atol, equal_nan=True)) + ) else: return lazy_equiv