Skip to content

fix: raise ValueError in compute_time_derivative when time frames < 2#914

Open
PewterZz wants to merge 1 commit intoneuroinformatics-unit:mainfrom
PewterZz:fix/single-frame-time-derivative
Open

fix: raise ValueError in compute_time_derivative when time frames < 2#914
PewterZz wants to merge 1 commit intoneuroinformatics-unit:mainfrom
PewterZz:fix/single-frame-time-derivative

Conversation

@PewterZz
Copy link
Copy Markdown

@PewterZz PewterZz commented Mar 18, 2026

Fixes #913

compute_time_derivative crashes with IndexError on single-frame data because xarray.differentiate needs at least 2 points. Added a check that raises a clear ValueError before calling differentiate.

@sonarqubecloud
Copy link
Copy Markdown

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.

fix: compute_time_derivative crashes with IndexError on single-frame data

1 participant