Skip to content

Commit c0323de

Browse files
kjeiKriFos1
authored andcommitted
Make keyword compress_data required in COMPRESS
1 parent 3800e9e commit c0323de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pipt/misc_tools/extract_tools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,11 @@ def organize_sparse_representation(info: Union[dict,list]) -> dict:
443443
mask = np.load(filename)['mask']
444444
sparse['mask'].append(mask.flatten())
445445

446+
if 'compress_data' not in info:
447+
raise KeyError("Missing required key: 'compress_data' specifying data to be compressed")
448+
446449
# Read rest of keywords
447-
sparse['compress_data'] = info.get('compress_data', False)
450+
sparse['compress_data'] = info['compress_data']
448451
sparse['level'] = info['level']
449452
sparse['wname'] = info['wname']
450453
sparse['threshold_rule'] = info['threshold_rule']

0 commit comments

Comments
 (0)