-
Notifications
You must be signed in to change notification settings - Fork 416
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
Interpolate_1d does not function with Type Error ( tuple indices must be integers or slices, not tuple) #998
Comments
So the problem is caused by pint 0.9. As a work-around for now, I'd suggest installing pint 0.8.1. |
I'm experiencing the same problem with |
Pint 0.9 fundamentally breaks a lot of things, so I'd roll to 0.8.1 |
What would be the best way to do that, through conda or pip? |
I lean to conda, so |
That’s weird. Could try |
I remembered I messed around with NCL and pygrib around the time of pint upgrade to 0.9. So went back in time and got back to originally having 0.8.1 before NCL/pygrib, then upgraded to 0.9, got the error again. This time going back to 0.8.1 w/o NCL or pygrib I was able to successfully run off 0.8.1 without any troubles from netcdf4. So I'm good, and have my isentropes again. Thanks as always for the pointers! |
I have started yesterday to use Metpy, and the current default installation (as of May 29 2019) installs I don't know if solving this issue is planned, but in the meantime I would suggest to update the descriptions of the impacted functions so that we know we have to use By the way, |
We’ll have a fix in the next release, sorry that that’s been lagging so long. Does this work to install pint: |
Well, As I said my solution was |
Pint functionality was fixed by #1087. Closing, but if there are still issues this can be reopened. |
Bugs
https://unidata.github.io/MetPy/latest/api/generated/metpy.interpolate.log_interpolate_1d.html#metpy.interpolate.log_interpolate_1d
Problem description: the code can not run with the error message as follow:
Traceback (most recent call last):
File "./test.py", line 7, in
print(metpy.interpolate.log_interpolate_1d(x_interp, x_log, y_log))
File "/Users/chaosun/anaconda3/lib/python3.7/site-packages/metpy/xarray.py", line 436, in wrapper
return func(*args, **kwargs)
File "/Users/chaosun/anaconda3/lib/python3.7/site-packages/pint/registry_helpers.py", line 194, in wrapper
result = func(*new_values, **kw)
File "/Users/chaosun/anaconda3/lib/python3.7/site-packages/metpy/interpolate/one_dimension.py", line 228, in log_interpolate_1d
return interpolate_1d(log_x, log_xp, *args, axis=axis, fill_value=fill_value)
File "/Users/chaosun/anaconda3/lib/python3.7/site-packages/metpy/xarray.py", line 436, in wrapper
return func(*args, **kwargs)
File "/Users/chaosun/anaconda3/lib/python3.7/site-packages/pint/registry_helpers.py", line 194, in wrapper
result = func(*new_values, **kw)
File "/Users/chaosun/anaconda3/lib/python3.7/site-packages/metpy/interpolate/one_dimension.py", line 119, in interpolate_1d
variables = [arr[sorter] for arr in args]
File "/Users/chaosun/anaconda3/lib/python3.7/site-packages/metpy/interpolate/one_dimension.py", line 119, in
variables = [arr[sorter] for arr in args]
TypeError: tuple indices must be integers or slices, not tuple
Versions:
The text was updated successfully, but these errors were encountered: