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

Method get_test_dataarray

xarray/tests/test_duck_array_wrapping.py:126–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

124 pytest.xfail(f"xfail for {self.namespace}: {reason}")
125
126 def get_test_dataarray(self):
127 data = np.asarray([[1, 2, 3, np.nan, 5]])
128 x = np.arange(5)
129 data = self.constructor(data)
130 return xr.DataArray(
131 data,
132 dims=["y", "x"],
133 coords={"y": [1], "x": x},
134 name="foo",
135 )
136
137
138@pytest.mark.parametrize("namespace", NAMESPACE_ARRAYS)

Callers 2

setUpMethod · 0.80
setUpMethod · 0.80

Calls 1

arangeMethod · 0.80

Tested by

no test coverage detected