This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hello! Thanks for reaching out to us. So far I am unable to re-create the error you're having on MetPy 1.0 with your provided code and data. Can you provide the entire code you are trying to run (as text/script, the notebook, or a screenshot)? Thanks for the information you've already provided! All the best, Drew > I am writing a code to calculate the heat index using Metpy 1.0 . However, > when running the code I am getting this error : 'numpy.ndarray' object has > no attribute 'to' > > How may I solve this error? I thoroughly follow the instructions on your > tutorial (https://www.youtube.com/watch?v=l71dlYe3enM&ab_channel=Unidata) > about metpy to calculate the heat index but it still gives me the same > error. I tried stackoverflow but I could not get an answer. > > Here is a piece of my code: > > > > > dataset = pd.read_csv(climate_data, > index_col=0, parse_dates=True)hu_index = calc.heat_index > (dataset["temperature"].values * units.degC, dataset["humidity"].values * > units.percent, mask_undefined = False)* > > I have attached the csv files and a picture of the full traceback error I > am getting. I am using Jupyter Notebook running on python 3.7.4. > Ticket Details =================== Ticket ID: LAC-825735 Department: Support Python Priority: Low Status: Closed =================== NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.