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

Function _data_allclose_or_equiv

xarray/testing/assertions.py:44–52  ·  view source on GitHub ↗
(arr1, arr2, rtol=1e-05, atol=1e-08, decode_bytes=True)

Source from the content-addressed store, hash-verified

42
43
44def _data_allclose_or_equiv(arr1, arr2, rtol=1e-05, atol=1e-08, decode_bytes=True):
45 if any(arr.dtype.kind == "S" for arr in [arr1, arr2]) and decode_bytes:
46 arr1 = _decode_string_data(arr1)
47 arr2 = _decode_string_data(arr2)
48 exact_dtypes = ["M", "m", "O", "S", "U", "T"]
49 if any(arr.dtype.kind in exact_dtypes for arr in [arr1, arr2]):
50 return duck_array_ops.array_equiv(arr1, arr2)
51 else:
52 return duck_array_ops.allclose_or_equiv(arr1, arr2, rtol=rtol, atol=atol)
53
54
55@ensure_warnings

Callers

nothing calls this directly

Calls 1

_decode_string_dataFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…