File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -586,19 +586,19 @@ def _handle_events_reading(events_fname, raw):
586586 culled_vals = culled ["value" ]
587587 try :
588588 culled_vals = np .asarray (culled_vals , dtype = float )
589- except ValueError :
589+ except ValueError : # contained strings or complex numbers
590590 pass
591591 else :
592592 try :
593593 culled_vals = culled_vals .astype (int )
594- except ValueError :
594+ except ValueError : # numeric, but has some non-integer values
595595 pass
596596 event_id = dict (zip (culled [trial_type_col_name ], culled_vals ))
597597 else :
598598 event_id = dict (zip (trial_types , np .arange (len (trial_types ))))
599599 descrs = np .asarray (trial_types , dtype = str )
600600
601- # Deal with "n/a" strings before converting to float
601+ # convert onsets & durations to floats ( "n/a" onsets were already dropped)
602602 ons = np .asarray (events_dict ["onset" ], dtype = float )
603603 durs = np .array (
604604 [0 if du == "n/a" else du for du in events_dict ["duration" ]], dtype = float
You can’t perform that action at this time.
0 commit comments