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

Method test_from_dask

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

Source from the content-addressed store, hash-verified

7532
7533 @requires_dask
7534 def test_from_dask(self) -> None:
7535 da = xr.DataArray([1, 2, 3], dims="x", coords={"lat": ("x", [4, 5, 6])})
7536 da_chunked = da.chunk(1)
7537
7538 assert_identical(da_chunked.as_numpy(), da.compute())
7539 np.testing.assert_equal(da.to_numpy(), np.array([1, 2, 3]))
7540 np.testing.assert_equal(da["lat"].to_numpy(), np.array([4, 5, 6]))
7541
7542 @requires_pint
7543 def test_from_pint(self) -> None:

Callers

nothing calls this directly

Calls 6

chunkMethod · 0.95
computeMethod · 0.95
to_numpyMethod · 0.95
assert_identicalFunction · 0.90
as_numpyMethod · 0.45
to_numpyMethod · 0.45

Tested by

no test coverage detected