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

Method test_inplace_math_error

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

Source from the content-addressed store, hash-verified

1853 v += Variable("y", np.arange(5))
1854
1855 def test_inplace_math_error(self):
1856 x = np.arange(5)
1857 v = IndexVariable(["x"], x)
1858 with pytest.raises(
1859 TypeError, match=r"Values of an IndexVariable are immutable"
1860 ):
1861 v += 1
1862
1863 def test_reduce(self):
1864 v = Variable(["x", "y"], self.d, {"ignored": "attributes"})

Callers

nothing calls this directly

Calls 2

IndexVariableClass · 0.90
arangeMethod · 0.80

Tested by

no test coverage detected