cbrnr / sleepecg

Sleep stage detection using ECG
BSD 3-Clause "New" or "Revised" License
90 stars 23 forks source link

numpy referenced before it is imported in the `heartbeat_detection` documentation #167

Closed tompollard closed 1 year ago

tompollard commented 1 year ago

This is a quick issue relating to the JOSS review comments at: https://github.com/openjournals/joss-reviews/issues/5411#issuecomment-1548163405

https://sleepecg.readthedocs.io/en/stable/heartbeat_detection/#usage has a nice overview of the heartbeat detection functionality.

import numpy as np should be moved to the code block above to avoid rri = 1000 * np.diff(beats) / fs failing with an import error.