tslearn-team / tslearn

The machine learning toolkit for time series analysis in Python
https://tslearn.readthedocs.io
BSD 2-Clause "Simplified" License
2.92k stars 342 forks source link

Update locate returned data type from np.int to np.int_ #453

Closed fspinna closed 1 year ago

fspinna commented 1 year ago

This commit updates the data type from np.int to np.int_ in locate method of LearningShapelets. The change ensures compatibility with the NumPy library given that using the aliases of builtin types like np.int is deprecated.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (d8c1930) 94.57% compared to head (a7102c8) 94.57%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #453 +/- ## ======================================= Coverage 94.57% 94.57% ======================================= Files 62 62 Lines 4738 4738 ======================================= Hits 4481 4481 Misses 257 257 ``` | [Impacted Files](https://app.codecov.io/gh/tslearn-team/tslearn/pull/453?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tslearn-team) | Coverage Δ | | |---|---|---| | [tslearn/shapelets/shapelets.py](https://app.codecov.io/gh/tslearn-team/tslearn/pull/453?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tslearn-team#diff-dHNsZWFybi9zaGFwZWxldHMvc2hhcGVsZXRzLnB5) | `95.93% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

YannCabanes commented 1 year ago

Hello @fspinna, thank you for your PR! Indeed, np.int is deprecated since NumPy 1.20.0: https://numpy.org/devdocs/release/1.20.0-notes.html It is replaced by np.int_ or int.