Skip to content

Commit b28fd2e

Browse files
committed
fix error when chunk_choice_method is not defined
1 parent ec75180 commit b28fd2e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Pose2Sim/triangulation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ def indices_of_first_last_non_nan_chunks(series, min_chunk_size=10, chunk_choice
118118
if not valid_runs:
119119
return(0,0)
120120

121+
if chunk_choice_method not in ['largest', 'all', 'first', 'last']:
122+
chunk_choice_method = 'all'
121123
if chunk_choice_method == 'largest':
122124
# Choose the largest chunk
123125
valid_runs.sort(key=lambda x: x[1] - x[0], reverse=True)

0 commit comments

Comments
 (0)