Record.convert_dtype should fail if expected data is missing #343
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is not directly related to other issues surrounding
smooth_frames
, but a minor bug that probably doesn't affect anyone at present.Record.convert_dtype
can be used to change the storage format of the signal array(s). (It's unlikely that applications will ever use this function directly and it's not included in the package documentation.)However, if
convert_dtype
is called withphysical=True
andsmooth_frames=False
, it should convert the data type(s) ofe_p_signal
. It shouldn't try to modifyp_signal
in this case (and the previous code would not have worked correctly either.) If you ask to convert the data type ofe_p_signal
, ande_p_signal
is None, this should raise an exception.