MCPcopy
hub / github.com/pydata/xarray / test_lazy_array

Method test_lazy_array

xarray/tests/test_dask.py:396–407  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

394 assert isinstance(lazy_ds.foo.variable.data, da.Array)
395
396 def test_lazy_array(self):
397 u = self.eager_array
398 v = self.lazy_array
399
400 self.assertLazyAndAllClose(u, v)
401 self.assertLazyAndAllClose(-u, -v)
402 self.assertLazyAndAllClose(u.T, v.T)
403 self.assertLazyAndAllClose(u.mean(), v.mean())
404 self.assertLazyAndAllClose(1 + u, 1 + v)
405
406 actual = xr.concat([v[:2], v[2:]], "x")
407 self.assertLazyAndAllClose(u, actual)
408
409 def test_compute(self):
410 u = self.eager_array

Callers

nothing calls this directly

Calls 3

assertLazyAndAllCloseMethod · 0.95
meanMethod · 0.45
concatMethod · 0.45

Tested by

no test coverage detected