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

Method test_getitem_dict

xarray/tests/test_variable.py:95–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

93 return Variable(["x", "y"], data)
94
95 def test_getitem_dict(self):
96 v = self.cls(["x"], np.random.randn(5))
97 actual = v[{"x": 0}]
98 expected = v[0]
99 assert_identical(expected, actual)
100
101 def test_getitem_1d(self):
102 data = np.array([0, 1, 2])

Callers

nothing calls this directly

Calls 2

assert_identicalFunction · 0.90
clsMethod · 0.45

Tested by

no test coverage detected