We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff2a553 commit 1539b1fCopy full SHA for 1539b1f
mne_bids/read.py
@@ -678,9 +678,11 @@ def events_file_to_annotation_kwargs(events_fname: str | Path) -> dict:
678
culled_vals = culled_vals.astype(int)
679
except ValueError: # numeric, but has some non-integer values
680
pass
681
+ # purge any np.str_, np.int_, or np.float_ types
682
+ culled_vals = np.asarray(culled_vals).tolist()
683
event_id = dict(zip(culled[trial_type_col_name], culled_vals))
684
else:
- event_id = dict(zip(trial_types, np.arange(len(trial_types))))
685
+ event_id = dict(zip(trial_types, list(range(len(trial_types)))))
686
descrs = np.asarray(trial_types, dtype=str)
687
688
# convert onsets & durations to floats ("n/a" onsets were already dropped)
0 commit comments