Zulko / ddeint

Scipy-based Delay Differential Equation (DDE) solver
Creative Commons Zero v1.0 Universal
36 stars 24 forks source link

Numpy 1.19 deprecation warning #9

Closed Firigion closed 2 months ago

Firigion commented 3 years ago

Since numpy 1.19 a deprecation warning is raised at line 145, namely VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray

The warning can be turned off with np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning), but still, the issue might need adressing. I actualy don't know why the warning is raised, since the lines 144-145

    results = [dde_.integrate(dde_.t + dt) for dt in np.diff(tt)]
    return np.array([g(tt[0])] + results)

shouldn't return a ragged array.

Zulko commented 2 months ago

This is now fixed thank you!