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

Function test_out

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

Source from the content-addressed store, hash-verified

156
157
158def test_out():
159 xarray_obj = xr.DataArray([1, 2, 3])
160
161 # xarray out arguments should raise
162 with pytest.raises(NotImplementedError, match=r"`out` argument"):
163 np.add(xarray_obj, 1, out=xarray_obj) # type: ignore[call-overload]
164
165 # but non-xarray should be OK
166 other = np.zeros((3,))
167 np.add(other, xarray_obj, out=other)
168 assert_identical(other, np.array([1, 2, 3]))
169
170
171def test_gufuncs():

Callers

nothing calls this directly

Calls 2

assert_identicalFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…