diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-11-02 14:20:10 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-11-02 14:20:10 +0100 |
commit | 69b4f98dc1de99971b3f5fb56fb07c04fa229e9c (patch) | |
tree | 0d68bcbc9b021a6b5e30041ba78eb470e598165b /lib/pelt.py | |
parent | 51cc485c19cc77dd9d89c27bf54ae7bc8eba9eda (diff) |
PELT: Do not set jump when len(signal) < num_samples
Diffstat (limited to 'lib/pelt.py')
-rw-r--r-- | lib/pelt.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pelt.py b/lib/pelt.py index 8966d56..a215b28 100644 --- a/lib/pelt.py +++ b/lib/pelt.py @@ -87,8 +87,9 @@ class PELT: # long as --pelt isn't active. import ruptures - if self.num_samples is not None: + if self.num_samples is not None and len(signal) > self.num_samples: self.jump = len(signal) // int(self.num_samples) + print(f"jump = {self.jump}") else: self.jump = 1 |