Skip to content

Commit

Permalink
assert dtype in i, f
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Jul 18, 2022
1 parent eb54e8c commit 065e32b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions MEArec/generators/recordinggenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,9 @@ def generate_recordings(self, tmp_mode=None, tmp_folder=None, n_jobs=0, template
else:
params['recordings']['dtype'] = rec_params['dtype']
dtype = params['recordings']['dtype']

assert np.dtype(dtype).kind in ("i", "f"), "Only integers and float dtypes are supported"

params['recordings']['adc_bit_depth'] = rec_params.get('adc_bit_depth', None)
adc_bit_depth = params['recordings']['adc_bit_depth']
params['recordings']['lsb'] = rec_params.get('lsb', None)
Expand Down

0 comments on commit 065e32b

Please sign in to comment.