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

Method make_example_math_dataset

xarray/tests/test_dataset.py:6607–6615  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6605 assert_identical(data.apply(np.mean), data.mean())
6606
6607 def make_example_math_dataset(self):
6608 variables = {
6609 "bar": ("x", np.arange(100, 400, 100)),
6610 "foo": (("x", "y"), 1.0 * np.arange(12).reshape(3, 4)),
6611 }
6612 coords = {"abc": ("x", ["a", "b", "c"]), "y": 10 * np.arange(4)}
6613 ds = Dataset(variables, coords)
6614 ds["foo"][0, 0] = np.nan
6615 return ds
6616
6617 def test_dataset_number_math(self) -> None:
6618 ds = self.make_example_math_dataset()

Calls 2

DatasetClass · 0.90
arangeMethod · 0.80

Tested by

no test coverage detected