MCPcopy Create free account
hub / github.com/pydata/xarray / test_binary_out

Function test_binary_out

xarray/tests/test_ufuncs.py:52–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51
52def test_binary_out():
53 args: list[int | float | npt.NDArray | xr.Variable | xr.DataArray | xr.Dataset] = [
54 1,
55 np.ones(2),
56 xr.Variable(["x"], [1, 1]),
57 xr.DataArray([1, 1], dims="x"),
58 xr.Dataset({"y": ("x", [1, 1])}),
59 ]
60 for arg in args:
61 actual_mantissa, actual_exponent = np.frexp(arg)
62 assert_identical(actual_mantissa, 0.5 * arg)
63 assert_identical(actual_exponent, arg)
64
65
66def test_binary_coord_attrs():

Callers

nothing calls this directly

Calls 1

assert_identicalFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…