Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
znicholls
left a comment
There was a problem hiding this comment.
Looks a good start. I guess it makes sense to get this in, then switch to some sort of xarray backend (dealing with #127 in the process) and then we'd have a pretty clear path to dealing with some sort of lazy loading over lots of runs..?
| @@ -0,0 +1,226 @@ | |||
| """ | |||
| :class:`ScmEnsemble` provides a container for holding data from different model runs. | |||
There was a problem hiding this comment.
| :class:`ScmEnsemble` provides a container for holding data from different model runs. | |
| :class:`ScmEnsemble` provides a container for holding data from different model runs. | |
| This is particularly useful for holding a collection of data on different time axes, without | |
| having to put all the data on the same time axes first (which can be a moderately expensive | |
| operation). |
| """ | ||
| str: Name of meta containing a unique identifer for each run | ||
|
|
||
| If no value is provided, then an implicit value is create. This ensures that every timeseries |
There was a problem hiding this comment.
| If no value is provided, then an implicit value is create. This ensures that every timeseries | |
| If no value is provided, then an implicit value is created. This ensures that every timeseries (across all :obj:`ScmRun` objects) |
| items.append(r[item]) | ||
| except KeyError: | ||
| continue | ||
| if not len(items): |
There was a problem hiding this comment.
| if not len(items): | |
| if not items: |
| pdt.assert_frame_equal( | ||
| ensemble.runs[0].timeseries().reset_index(), | ||
| res.xs(0, level="run_id").dropna(how="all", axis="columns").reset_index(), | ||
| check_like=True, # To remove once #97 is resolved |
There was a problem hiding this comment.
| check_like=True, # To remove once #97 is resolved | |
| check_like=True, |
What is #97? Can be removed right?
|
|
||
| assert res.run_ids == [0, 1] | ||
|
|
||
| # TODO: fix inconcistency with columns type of timeseries |
|
|
||
| def __init__(self, runs=None): | ||
| """ | ||
|
|
There was a problem hiding this comment.
Are we intending on adding more loading functionality? If no, we should change the notebook
There was a problem hiding this comment.
Just looked at the notebook properly, assuming we're waiting to sort this before we start mucking around with writing the notebook?
Pull request
Please confirm that this pull request has done the following:
CHANGELOG.rstaddedThoughts before I flesh out docs
Closes #98