jtwhite79 / decision_support_analysis_notebooks

17 stars 4 forks source link

numpy compatibility issues with flopy and pyemu #2

Open elwan3 opened 1 year ago

elwan3 commented 1 year ago

I've run into a couple of hiccups with flopy and pyemu and it seems to be connected to numpy. Here is the rundown:

First up, the flopy problem Tried importing flopy and get hit with this AttributeError about np.float being deprecated. So here is what the traceback looked like

AttributeError: module 'numpy' has no attribute 'float'.

Quick fix Good news, I managed to get past this by downgrading to numpy=1.19

Next, the pyemu issue After sorting out the first one, I ended up hitting a wall in pyemu. The method OrdinaryKrige.calc_factors_grid throws a TypeError. Here is that traceback

TypeError: ufunc 'isfinite' not supported for the input types...

Any tips on how to fix it?

jtwhite79 commented 1 year ago

you know @elwan3 I probably should take down these notebooks - the GMDSI notebooks https://github.com/gmdsi/GMDSI_notebooks have replaced these notebooks and are actively maintained. Is there anything specific you are trying to see in these notebooks that isn't in the GMDSI notebooks?

I suspect that pyemu/numpy issue is because you might need to downgrade numpy even more into the ancient past...of 3 years ago!

elwan3 commented 1 year ago

Totally get it, @jtwhite79. Those GMDSI notebooks are gold! The old dsa notebooks align well with a current project we've got going (especially with the nwt, 3-layer model, and dry period obs).

You're a legend for putting out all these awesome resources! Many thanks!