Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy.misc.electrocardiogram has been deprecated #166

Closed
tompollard opened this issue May 18, 2023 · 5 comments · Fixed by #195
Closed

scipy.misc.electrocardiogram has been deprecated #166

tompollard opened this issue May 18, 2023 · 5 comments · Fixed by #195

Comments

@tompollard
Copy link

This is a quick issue relating to the JOSS review comments at: openjournals/joss-reviews#5411 (comment)

The example code at https://sleepecg.readthedocs.io/en/stable/heartbeat_detection/#usage (and elsewhere) uses scipy.misc.electrocardiogram which has been deprecated.

ecg = electrocardiogram()

<stdin>:1: DeprecationWarning: scipy.misc.electrocardiogram has been deprecated in SciPy v1.10.0; and will be completely removed in SciPy v1.12.0. Dataset methods have moved into the scipy.datasets module. Use scipy.datasets.electrocardiogram instead.

At some point the examples should be updated to use the new location: (scipy.datasets.electrocardiogram).

@cbrnr
Copy link
Owner

cbrnr commented May 19, 2023

I have already addressed this in the tests, but AFAIK the only way to do so is pretty ugly:

try:
    from scipy.datasets import electrocardiogram
except ImportError:
    from scipy.misc import electrocardiogram

Which I think would be distracting in the examples. But then again, the DeprecationWarning is also distracting, so I'm a bit unsure how to proceed.

@cbrnr
Copy link
Owner

cbrnr commented May 19, 2023

One possible solution could be to wrap this example dataset into our own object (e.g. in sleepecg.utils). Thoughts?

@tompollard
Copy link
Author

Hmm, you could keep this issue open and update the dependency and documentation later? Either that or just bump the scipy dependency to 1.10.0 now and get it out of the way!

@cbrnr
Copy link
Owner

cbrnr commented May 19, 2023

Let's keep it open then. I'd like to wait until SciPy 1.11 or 1.12 before I bump it to 1.10. People don't always have access to the latest package versions immediately.

@cbrnr
Copy link
Owner

cbrnr commented Oct 4, 2023

If we take these support windows defined by the Scientific Python project, we can drop support for SciPy < 1.10 on 28 Jul 2024.

@cbrnr cbrnr linked a pull request Nov 10, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants