NeuralEnsemble / elephant

Elephant is the Electrophysiology Analysis Toolkit
http://www.python-elephant.org
BSD 3-Clause "New" or "Revised" License
202 stars 92 forks source link

[Fix] expired scipy deprecations, sp.sqrt #616

Closed Moritz-Alexander-Kern closed 8 months ago

Moritz-Alexander-Kern commented 10 months ago

This pull request (PR) replaces the usage of the sp.sqrt function with np.sqrt.

The deprecation of sp.sqrt expired earlier than expected. Originally, it was planned to be removed with the release of scipy 2.0.0, but with scipy version greater than 1.10.1, unit tests are failing.

Deprecation was introduced in scipy 1.4.0:

https://docs.scipy.org/doc/scipy/release/1.4.0-notes.html#scipy-deprecations

Quote from the scipy release notes:

Support for NumPy functions exposed via the root SciPy namespace is deprecated and will be removed in 2.0.0. For example, if you use scipy.rand or scipy.diag, you should change your code to directly use numpy.random.default_rng or numpy.diag, respectively. They remain available in the currently continuing Scipy 1.x release series.

Further deprecations fixed:

coveralls commented 10 months ago

Coverage Status

coverage: 88.234% (-0.001%) from 88.235% when pulling 0f70fb47bbd0ae33c4b675af537a9858929e24f3 on INM-6:fix/scipy_deprecations_expired into e2df1b96a4d82532f7d29b9e3eb8c1f271afa58b on NeuralEnsemble:master.

pep8speaks commented 10 months ago

Hello @Moritz-Alexander-Kern! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 284:9: E741 ambiguous variable name 'I' Line 296:9: E741 ambiguous variable name 'I'

Comment last updated at 2024-01-25 15:53:34 UTC