def test_q27(self, ndq_series): out = streamflow.freq_analysis(ndq_series, mode="max", t=2, dist="gamma", window=7) assert out.shape == (1, 2, 3)
def test_no_indexer(self, ndq_series): out = streamflow.freq_analysis(ndq_series, mode="max", t=[2, 5], dist="gamma") assert out.long_name == "N-year return period max annual 1-day flow" assert out.shape == (2, 2, 3) # nrt, nx, ny
def test_simple(self, ndq_series): out = streamflow.freq_analysis(ndq_series, mode='max', t=[2, 5], dist='gamma', season='DJF') assert out.long_name == 'N-year return period max winter 1-day flow'
def test_simple(self, ndq_series): out = streamflow.freq_analysis(ndq_series, mode="max", t=[2, 5], dist="gamma", season="DJF") assert out.long_name == "N-year return period max winter 1-day flow" assert out.shape == (2, 2, 3) # nrt, nx, ny
def test_empty(self, ndq_series): q = ndq_series.copy() q[:, 0, 0] = np.nan out = streamflow.freq_analysis(q, mode="max", t=2, dist="genextreme", window=6, freq="YS") assert np.isnan(out.values[:, 0, 0]).all()
def test_no_indexer(self, ndq_series): out = streamflow.freq_analysis(ndq_series, mode='max', t=[2, 5], dist='gamma') assert out.long_name == 'N-year return period max annual 1-day flow'