NOAA-CSL / MELODIES-MONET

MELODIES MONET - diagnostic tool for evaluating models against a variety of observations including surface, aircraft, and satellite data all within a common framework
https://melodies-monet.readthedocs.io
Apache License 2.0
19 stars 21 forks source link

New incompatibility: numpy.NaN is deprecated #263

Open blychs opened 1 month ago

blychs commented 1 month ago

Hi all, This might be already enforced by matplotlib<3.9 (I haven't tested that). However, the new numpy 2.0.0 (released a month ago), that was just added to conda-forge, deprecates np.NaN and replaces is by np.nan. I am still trying to understand which package is really requiring it, I got the error while trying to compile locally the docs in my personal computer (I had it in a cluster before, since I can't compile wrf-python in my local computer due to it being apple silicon).

I will edit this issue when I have more info.

zmoon commented 1 month ago

@blychs looks like it was removed for NumPy v2. It should be safe to update all code to use np.nan, which works in NumPy v1 as well.

blychs commented 1 month ago

That's right. However, I just can't find any of our code using it, but building the docs fails with that version of numpy.

zmoon commented 1 month ago

MONET has a few (and MONETIO a lot), that could be the issue. Does the traceback show any info about where the error occurred?

blychs commented 1 month ago

When building the docs, I only get that it cannot import driver.py because it cannot find numpy.NaN -which makes sense. It is likely as you say. I will finish testing this, hopefully next week at the latest.

blychs commented 2 weeks ago

Can this be closed @zmoon @rschwant ? I believe that this was fixed at the MONETIO level.

zmoon commented 2 weeks ago

Fine with me. Though, do you want to add some info about this to #266 ?