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

Method test_to_numpy

xarray/tests/test_dataarray.py:7525–7531  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7523 np.testing.assert_equal(da["lat"].to_numpy(), np.array([4, 5, 6]))
7524
7525 def test_to_numpy(self) -> None:
7526 arr = np.array([1, 2, 3])
7527 da = xr.DataArray(arr, dims="x", coords={"lat": ("x", [4, 5, 6])})
7528
7529 with assert_no_warnings():
7530 np.testing.assert_equal(np.asarray(da), arr)
7531 np.testing.assert_equal(np.array(da), arr)
7532
7533 @requires_dask
7534 def test_from_dask(self) -> None:

Callers

nothing calls this directly

Calls 1

assert_no_warningsFunction · 0.90

Tested by

no test coverage detected