Skip to content

Commit 8903a2f

Browse files
committed
fix doctest (missing comma, np.str keys)
1 parent 0aab19e commit 8903a2f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

mne_bids/read.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ def events_file_to_annotation_kwargs(events_fname: str | Path) -> dict:
592592
... 'duration': [0.1, 0.1, 0.1],
593593
... 'trial_type': ['event1', 'event2', 'event1'],
594594
... 'value': [1, 2, 1],
595-
... 'sample': [10, 20, 30]
595+
... 'sample': [10, 20, 30],
596596
'foo': ['a', 'b', 'c'],
597597
... }
598598
>>> df = pd.DataFrame(data)

mne_bids/tsv_handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def _from_tsv(fname, dtypes=None):
158158
# If data is 1-dimensional (only header), make it 2D
159159
data = np.atleast_2d(data)
160160

161-
column_names = data[0, :]
161+
column_names = data[0, :].tolist() # cast to list to avoid `np.str()` keys in dict
162162
info = data[1:, :]
163163
data_dict = OrderedDict()
164164
if dtypes is None:

0 commit comments

Comments
 (0)