(self)
| 215 | assert not a2._in_memory |
| 216 | |
| 217 | def test_reduce(self): |
| 218 | u = self.eager_var |
| 219 | v = self.lazy_var |
| 220 | self.assertLazyAndAllClose(u.mean(), v.mean()) |
| 221 | self.assertLazyAndAllClose(u.std(), v.std()) |
| 222 | with raise_if_dask_computes(): |
| 223 | actual = v.argmax(dim="x") |
| 224 | self.assertLazyAndAllClose(u.argmax(dim="x"), actual) |
| 225 | with raise_if_dask_computes(): |
| 226 | actual = v.argmin(dim="x") |
| 227 | self.assertLazyAndAllClose(u.argmin(dim="x"), actual) |
| 228 | self.assertLazyAndAllClose((u > 1).any(), (v > 1).any()) |
| 229 | self.assertLazyAndAllClose((u < 1).all("x"), (v < 1).all("x")) |
| 230 | with pytest.raises(NotImplementedError, match=r"only works along an axis"): |
| 231 | v.median() |
| 232 | with pytest.raises(NotImplementedError, match=r"only works along an axis"): |
| 233 | v.median(v.dims) |
| 234 | with raise_if_dask_computes(): |
| 235 | v.reduce(duck_array_ops.mean) |
| 236 | |
| 237 | def test_missing_values(self): |
| 238 | values = np.array([0, 1, np.nan, 3]) |
nothing calls this directly
no test coverage detected