Skip to content
Snippets Groups Projects
Commit a0ecd315 authored by Bert Palm's avatar Bert Palm 🎇
Browse files

timeindex vs numindex fix

parent 8f6e996e
No related branches found
No related tags found
No related merge requests found
......@@ -145,7 +145,7 @@ def runner(metafname, flagger, data, flags=None, nodata=np.nan):
plot(dchunk, ffchunk, mask, varname, flagger, title=flag_test)
data.loc[start_date:end_date] = dchunk
flags[start_date:end_date] = ffchunk.squeeze()
flags.loc[start_date:end_date] = ffchunk.squeeze()
flagger.nextTest()
......
......@@ -41,7 +41,7 @@ def test_positionalPartitioning(flagger):
vname, start_index, end_index = row[fields]
fchunk = pflags.loc[flagger.isFlagged(pflags[vname]), vname]
assert fchunk.index.min() == start_index, "different start indices"
assert fchunk.index.max() + 1 == end_index, f"different end indices: {fchunk.index.max()} vs. {end_index}"
assert fchunk.index.max() == end_index, f"different end indices: {fchunk.index.max()} vs. {end_index}"
@pytest.mark.parametrize("flagger", TESTFLAGGERS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment