Closed laat0003 closed 1 year ago
Thanks @laat0003 - that function is a problem in general; it was causing issues with the latest jump to pandas 2.X in pyemu also and I lost interest in trying to patch it. Are you using the conda env and the the pyemu src that comes with the notebooks?
My conda env may not be the same but I am using the pyemu src that comes with the notebooks. I've attached my conda env if it is of any use.
Cheers for the quick reply.
Hey @laat0003,
I've updated the env yml file to require pandas <2.0 and plotting is still working with a fresh env install. Sounds like an incompatibility with your env. This is why we try to keep the repo self-contained.
btw @jtwhite79, we should at some point update all of this with the post-pandas 2.0
version of pyemu
...adding to the to-do list.
Cheers, R
Curses! You are correct. My apologies @rhugman and @jtwhite79. I'm too big of a fanboi for these notebooks so just downloaded and binged them without reading the fine print. I'll make sure to double-check env compatibility in the future.
All the best, Tariq
Hi,
I am unsure if this is related to the other bug report but the Prior Monte Carlo notebook currently fails when you first try to use pyemu.plot_utils.ensemble_res_1to1(). From what I can tell the function _get_plotlims() is the problem. Specifically, the following lines, which seem to work fine when passing in a base_ensemble but fail when base_ensemble = None.
line1413 bemin = np.min([bemin, beni.min().min()]) line1414 bemax = np.max([bemax, beni.max().max()])
My band-aid solution to get the notebook working was to do the following
if base_ensemble is not None: #I added this bemin = np.min([bemin, beni.min().min()]) # original code bemax = np.max([bemax, beni.max().max()]) #original code else: #I added this bemin = np.min([bemin, beni.min()]) #I added this bemax = np.max([bemax, beni.max()]) #I added this
It all worked fine after that.
Cheers, Tariq