MCPcopy Create free account
hub / github.com/holoviz/hvplot / TestXArrayTransforms

Class TestXArrayTransforms

hvplot/tests/testtransforms.py:55–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53
54
55class TestXArrayTransforms(ComparisonTestCase):
56 def setUp(self):
57 try:
58 import xarray as xr # noqa
59 except ImportError:
60 raise SkipTest('xarray not available')
61 import hvplot.xarray # noqa
62
63 def test_xarray_transform(self):
64 import xarray as xr
65
66 data = np.arange(0, 60).reshape(6, 10)
67 x = np.arange(10)
68 y = np.arange(6)
69 da = xr.DataArray(data, coords={'y': y, 'x': x}, dims=('y', 'x'), name='value')
70 img = da.hvplot.image(transforms=dict(value=hv.dim('value') * 10))
71 self.assertEqual(img.data.value.data, da.data * 10)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…