NREL / MoorPy

BSD 3-Clause "New" or "Revised" License
28 stars 15 forks source link

Np.float_ Error #26

Closed lmac-amog closed 1 week ago

lmac-amog commented 2 months ago

Description

System creation throws an error - I believe this is because np.float_ is now out of use as of numpy 2.0. Fixed this locally by swapping to np.float64 across all functions in moorpy.

Steps to reproduce issue

import moorpy as MP

MP_sys = MP.System()

Current behavior

Throws an attribute error: AttributeError: np.float_ was removed in the NumPy 2.0 release. Use np.float64 instead.. Did you mean: 'float16'? The error originates from the Body() function.

Expected behavior

No error

Code versions

mattEhall commented 1 week ago

We've addressed this by using basic python int/float equivalents instead.