-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support average in generic concat #810
Conversation
tests/test_generic.py
Outdated
|
||
def test_concat_average(tmp_path: Path) -> None: | ||
# Test for multiple items? | ||
g = mikeio.Grid1D(x=range(5), projection="LONG/LAT") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
projection is not meaningful for Grid1D. I would skip it.
mikeio/generic.py
Outdated
if not last_file: | ||
dfs_n = DfsFileFactory.DfsGenericOpen(str(infilenames[i + 1])) | ||
nf = dfs_n.FileInfo.TimeAxis.StartDateTime | ||
next_start_time = datetime( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this step necessary, isn't nf
already a datetime?
tests/test_generic.py
Outdated
da_x0 = ds[0].isel(x=0) | ||
|
||
assert np.allclose( | ||
da_x0.values.flatten(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is .flatten()
necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no you right, for a 1d array flatten is not needed. will remove it
No description provided.