modflowpy / flopy

A Python package to create, run, and post-process MODFLOW-based models.
https://flopy.readthedocs.io
Other
507 stars 307 forks source link

refactor(lgrutil): coerce numpy types to builtins for np2 compat #2158

Closed wpbonelli closed 5 months ago

wpbonelli commented 5 months ago
wpbonelli commented 5 months ago

Numpy migration notes say this is expected for expressions where float32 is combined with the builtin float, this was the only one caught by a test but there are probably more cases where the change in promotion rules leads to slightly different results,. In general it may suffice to relax test comparisons but where we return non-numpy data structures (as here) it seems worth converting any np scalars to builtins for consistency