Found in the #16 correctness/prose/comments audit (verified). Two latent defects in Projects/GestureRecognizer/gesturerec/data.py. Neither is hit by the current notebooks, but both will bite anyone who uses these helpers.
1. get_gesture_names_filtered appends the list to itself (data.py ~line 360):
for gesture_name in self.map_gestures_to_trials.keys():
if gesture_name not in filter_names:
gesture_names.append(gesture_names) # <-- should be gesture_name
return sorted(gesture_names)
It appends the accumulator list to itself instead of the name, so the function returns garbage (and sorted would raise on the nested list). Fix: gesture_names.append(gesture_name).
2. get_random_gesture_set is defined twice (data.py ~lines 371 and 418). The second definition shadows the first; both work, but the duplicate is dead/confusing. Remove one.
Found in the #16 correctness/prose/comments audit (verified). Two latent defects in
Projects/GestureRecognizer/gesturerec/data.py. Neither is hit by the current notebooks, but both will bite anyone who uses these helpers.1.
get_gesture_names_filteredappends the list to itself (data.py~line 360):It appends the accumulator list to itself instead of the name, so the function returns garbage (and
sortedwould raise on the nested list). Fix:gesture_names.append(gesture_name).2.
get_random_gesture_setis defined twice (data.py~lines 371 and 418). The second definition shadows the first; both work, but the duplicate is dead/confusing. Remove one.