MCPcopy Index your code
hub / github.com/pydata/xarray / assert_duckarray_allclose

Function assert_duckarray_allclose

xarray/testing/assertions.py:301–308  ·  view source on GitHub ↗

Like `np.testing.assert_allclose`, but for duckarrays.

(
    actual, desired, rtol=1e-07, atol=0, err_msg="", verbose=True
)

Source from the content-addressed store, hash-verified

299
300@ensure_warnings
301def assert_duckarray_allclose(
302 actual, desired, rtol=1e-07, atol=0, err_msg="", verbose=True
303):
304 """Like `np.testing.assert_allclose`, but for duckarrays."""
305 __tracebackhide__ = True
306
307 allclose = duck_array_ops.allclose_or_equiv(actual, desired, rtol=rtol, atol=atol)
308 assert allclose, _format_message(actual, desired, err_msg=err_msg, verbose=verbose)
309
310
311@ensure_warnings

Callers 3

test_itemMethod · 0.85

Calls 1

_format_messageFunction · 0.85

Tested by 3

test_itemMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…