wrf-python icon indicating copy to clipboard operation
wrf-python copied to clipboard

Remove np.float_ as a fill option

Open kprussing opened this issue 10 months ago • 1 comments

Running with NumPy 2.2.2 produces the following error:

AttributeError: `np.float_` was removed in the NumPy 2.0 release. Use `np.float64` instead.

This removes the unsupported type.

kprussing avatar Mar 06 '25 20:03 kprussing

Thanks for catching this!

I think we may want to make this dependent upon the NumPy version, but can take care of that.

kafitzgerald avatar Mar 18 '25 17:03 kafitzgerald

Is your suggestion that they should add the following, on line 65 or so?

try:
    _DEFAULT_FILL_MAP[np.dtype(np.float_)] = Constants.DEFAULT_FILL_DOUBLE
except AttributeError:
    pass

DWesl avatar Jul 12 '25 03:07 DWesl

Yeah, and sorry for the delay on this.

I was hoping to get this quickly merged a while back, but ran into some diffs in testing it from what I'm now fairly confident is type promotion changes with NumPy 2.0.

I have a bit of time this week and was hoping to track down what needs to be changed.

kafitzgerald avatar Jul 16 '25 20:07 kafitzgerald