def test_missing(self, ndq_series): a = ndq_series a = ndq_series.where(~((a.time.dt.dayofyear == 5) * (a.time.dt.year == 1902))) assert a.shape == (5000, 2, 3) out = land.stats(a, op="max", month=1) np.testing.assert_array_equal(out.sel(time="1900").isnull(), False) np.testing.assert_array_equal(out.sel(time="1902").isnull(), True)
def test_simple(self, ndq_series): ts = land.stats(ndq_series, freq="YS", op="max") p = land.fit(ts, dist="gumbel_r") assert p.attrs["estimator"] == "Maximum likelihood"
def test_simple(self, ndq_series): out = land.stats(ndq_series, freq="YS", op="min", season="MAM") assert out.attrs["units"] == "m^3 s-1"