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
AttributeError: module 'numpy' has no attribute 'alen' #3423
Comments
How did you install MetPy? Can you please provide the full python traceback for the |
Traceback (most recent call last):
File "/Users/eprl/workplace/Prediction/code/plot/4_interpolation.py", line 10, in <module>
from metpy.interpolate import (interpolate_to_grid, remove_nan_observations,
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/metpy/__init__.py", line 35, in <module>
from .xarray import * # noqa: F401, F403
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/metpy/xarray.py", line 28, in <module>
from .units import DimensionalityError, UndefinedUnitError, units
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/metpy/units.py", line 22, in <module>
import pint
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/pint/__init__.py", line 28, in <module>
from .measurement import Measurement
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/pint/measurement.py", line 12, in <module>
from .quantity import Quantity
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/pint/quantity.py", line 47, in <module>
from .numpy_func import (
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/pint/numpy_func.py", line 860, in <module>
implement_func("function", func_str, input_units=None, output_unit=None)
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/pint/numpy_func.py", line 263, in implement_func
func = getattr(np, func_str_split[0])
File "/Users/eprl/anaconda3/lib/python3.10/site-packages/numpy/__init__.py", line 311, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'alen' |
sounds like an incompatable version of numpy, which version do you have installed? see hgrecco/pint#1532 |
Yes, the output of |
Which one should I delete? Name Version Build Channelnumpy 1.23.4 py310hb93e574_0 Name Version Build Channelpint 0.11 py_1 conda-forge/label/cf202003 |
Regardless, I think your solution should be: |
What went wrong?
I got AttributeError
from metpy.interpolate import (interpolate_to_grid, remove_nan_observations, remove_repeat_coordinates)
AttributeError: module 'numpy' has no attribute 'alen'
Operating System
MacOS
Version
metpy1.6
Python Version
python 3.10.9
Code to Reproduce
Errors, Traceback, and Logs
No response
The text was updated successfully, but these errors were encountered: