Open LydiaMak opened 4 months ago
Hi Lydia,
Thanks for bringing this up! This is a recent issue with changes in the latest numpy models that requires some rewriting of interpolation functions in the code. We are currently working on getting it fixed, but it should be backwards compatible with early versions of numpy. For now, if you'd like you can download the source code from github and run it with earlier numpy versions and it should work. Sorry about this!
Best, Brenna
Hi Brenna,
No worries, thanks for letting me know! A question about using the source code. Should I make the steps described for development install and it should work?
I tried the setup.py from github but still doesn't work. Should I add something specific for it to use an older version of numpy?
Hmm I'm not sure what your exact python setup is. I normally have a separate conda environment for MOSFiT, and I checked my numpy in it and it's currently using v1.21.5. From a quick google search of this issue, switching to 1.21 should fix it for now (e.g. https://github.com/numpy/numpy/issues/23231). If you'd like more help, feel free to email me at bmockler@carnegiescience.edu! Also, I should get the issue fixed in the next couple weeks, I have just been traveling for the past month and haven't been able to get to it yet.
Recent NumPy versions silently creates an object array. The solution is to use dtype = 'object' to make sure numpy doesn't silently creates an object array.
e.g. instead of x = np.array(blah) it shloud be x = np.array(blah, dtype='object').
also, another change you need to make in few of the codes is to use 'float64' instead of just 'float' while specifying data type.
Hi Lydia, I think this is now fixed -- I just had to implement Brenna and Harsh's solution in one extra line. Try the latest version and see if it works!
Hi,
I am trying to run mosfit (I had to reinstall) so it's the latest version and I get this error
I also tried another model e.g. ia and it moved on to the next step so probably the issue is the TDE model.
Any ideas?
Thanks, Lydia