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

Method test_load_dataarray

xarray/tests/test_backends.py:6517–6525  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6515 ds.to_netcdf(tmp)
6516
6517 def test_load_dataarray(self) -> None:
6518 with create_tmp_file() as tmp:
6519 original = DataArray(np.random.randn(10), dims=["x"])
6520 original.to_netcdf(tmp)
6521 da = load_dataarray(tmp)
6522 assert_identical(original, da)
6523 # this would fail if we used open_dataarray instead of
6524 # load_dataarray
6525 da.to_netcdf(tmp)
6526
6527 def test_load_datatree(self) -> None:
6528 with create_tmp_file() as tmp:

Callers

nothing calls this directly

Calls 6

to_netcdfMethod · 0.95
DataArrayClass · 0.90
load_dataarrayFunction · 0.90
assert_identicalFunction · 0.90
create_tmp_fileFunction · 0.85
to_netcdfMethod · 0.45

Tested by

no test coverage detected