flopy icon indicating copy to clipboard operation
flopy copied to clipboard

NumPy 2.0 compatibility

Open wpbonelli opened this issue 1 year ago • 0 comments

Opening this (somewhat belatedly) to track support for NumPy 2.0, due out soon. The maintainers recommend downstream projects make a compatible release before 2.0 drops. We have already made some progress updating API usages. The biggest consideration is our runtime dependencies on projects which depend on numpy (checks indicate whether the project has released 2.0 support)

Core requirements (pandas and mpl) are already covered. If 2.0 is imminent before all our optional dependencies support it, we will need to decide whether to release immediately or wait, but it sounds like at least a month remaining, so with luck it won't come to that.

Tasks:

  • [x] pin numpy<2.0 until supported
    • #2092
  • [x] update deprecated/removed syntax
    • #2088
    • #2124
  • [x] run ruff rule NPY201, all looks good
  • [x] accommodate dtype promotion changes — this may be an ongoing task, as these can easily go unnoticed where not captured by a regression/snapshot test
    • #2158
  • [ ] pass all tests with numpy>=2.0.0rc1
  • [ ] release (3.7.0?) compatible with np2

wpbonelli avatar Apr 15 '24 16:04 wpbonelli