(self, dtype)
| 2156 | assert_identical(expected, actual) |
| 2157 | |
| 2158 | def test_set_dims(self, dtype): |
| 2159 | array = np.linspace(0, 5, 3 * 10).reshape(3, 10).astype(dtype) * unit_registry.m |
| 2160 | variable = xr.Variable(("x", "y"), array) |
| 2161 | |
| 2162 | dims = {"z": 6, "x": 3, "a": 1, "b": 4, "y": 10} |
| 2163 | expected = attach_units( |
| 2164 | strip_units(variable).set_dims(dims), extract_units(variable) |
| 2165 | ) |
| 2166 | actual = variable.set_dims(dims) |
| 2167 | |
| 2168 | assert_units_equal(expected, actual) |
| 2169 | assert_identical(expected, actual) |
| 2170 | |
| 2171 | def test_copy(self, dtype): |
| 2172 | array = np.linspace(0, 5, 10).astype(dtype) * unit_registry.m |
nothing calls this directly
no test coverage detected