Skip to content

Commit 54e60f7

Browse files
committed
Made general info key matching case insensitive
1 parent b5ecf48 commit 54e60f7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nibabel/parrec.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,10 @@ def _split_header(fobj):
346346
def _process_gen_dict(gen_dict):
347347
"""Process `gen_dict` key, values into `general_info`"""
348348
general_info = {}
349+
hdr_key_dict_lower = {key.lower(): val for key, val in _hdr_key_dict.items()}
349350
for key, value in gen_dict.items():
350351
# get props for this hdr field
351-
props = _hdr_key_dict[key]
352+
props = hdr_key_dict_lower[key.lower()]
352353
# turn values into meaningful dtype
353354
if len(props) == 2:
354355
# only dtype spec and no shape

0 commit comments

Comments
 (0)