Skip to content

Commit af311e7

Browse files
cgmaioranoAsanto32
andauthored
Update src/graphomotor/core/models.py
Co-authored-by: Adam Santorelli <148909356+Asanto32@users.noreply.github.com>
1 parent dec843f commit af311e7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/graphomotor/core/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,7 @@ def detect_hesitations(self, threshold_percentile: int = 20) -> None:
343343
hesitations = self.velocities < threshold_velocity
344344

345345
hesitation_changes = np.diff(hesitations.astype(int))
346-
hesitation_starts = np.where(hesitation_changes == 1)[0] + 1
347-
hesitation_count = len(hesitation_starts)
346+
hesitation_count = np.sum(hesitation_changes == 1)
348347

349348
if hesitations[0]:
350349
hesitation_count += 1

0 commit comments

Comments
 (0)