modelon-community / Assimulo

Assimulo is a simulation package for solving ordinary differential equations.
https://jmodelica.org/assimulo/index.html
GNU Lesser General Public License v3.0
66 stars 16 forks source link

numpy.float #68

Closed Whyhow314 closed 8 months ago

Whyhow314 commented 8 months ago

When I run simulate using Radau5ODE, I get a large number of errors

Traceback (most recent call last): File "/home/peter/miniforge3/envs/stites/lib/python3.11/site-packages/numpy/init.py", line 324, in getattr raise AttributeError(__former_attrs__[attr]) AttributeError: module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations Exception ignored in: 'radau5ode.py2c_d'

These do not occur with RodasODE, CVode, or LSODAR. The only place I could find N.float in the repo is explicit_ode.pyx, lines 40 and 41, but I am not sure how to test if that is the problem.

PeterMeisrimelModelon commented 8 months ago

There were a few more instances in radau5ode.pyx.

This issue should be fixed by https://github.com/modelon-community/Assimulo/pull/69