indexes function slow for certain type of arrays
Issue #32
resolved
For arrays such as:
import numpy as np
signal_sin = np.sin(np.arange(0,10,0.001))
signal_zero = np.zeros_like(signal_sin)
signal = np.tile(np.concatenate((signal_sin, signal_zero)), 50)
peakutils.indexes is very slow. This is due to the current way of removing zero values in dy
.
I have arrays like this where periods of noise in the data create long plateaus of zero values.
I'll submit a PR with a proposed change.
Comments (2)
-
repo owner -
repo owner - changed status to resolved
Merged.
- Log in to comment
I confirm this issue and welcome the PR (please check the initial PR review).