Skip to content

Conversation

@TrevorChartier
Copy link

Previously, if the data contained only one blink, and the blink occured at the start of the sequence (ie. pupil size is -1 for first index), blink onset would be empty, but length_blinks would be greater than zero because blink offset would not be empty. This would cause an IndexError when attempting to access blink_onset[0]. This change adds a guard clause to handle this edge case and prevent the error.

…the sequence

Previously, if the data contained only one blink, and the blink occured at the start of the sequence (ie. pupil size is -1 for first index), blink onset would be empty, but length_blinks would be greater than zero because blink offset would not be empty. This would cause an IndexError when attempting to access blink_onset[0]. This change adds a guard clause to handle this edge case and prevent the error.
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 this pull request may close these issues.

1 participant