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

Method is_compatible

xarray/tests/test_units.py:3037–3042  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

3035 )
3036 def test_comparisons(self, func, variation, unit, dtype):
3037 def is_compatible(a, b):
3038 a = a if a is not None else 1
3039 b = b if b is not None else 1
3040 quantity = np.arange(5) * a
3041
3042 return a == b or quantity.check(b)
3043
3044 data = np.linspace(0, 5, 10).astype(dtype)
3045 coord = np.arange(len(data)).astype(dtype)

Callers

nothing calls this directly

Calls 2

arangeMethod · 0.80
checkMethod · 0.80

Tested by

no test coverage detected