-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle edge case in reencode_samples
#88
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit concerned that we're changing an error (albeit an inscrutable one) into a warning and creating the possibility of returning wrong results on EDF import for EDF files that are somehow corrupted.
I can see two ways of handling this a bit better. First would be to move the check introduced here to reencode_samples
. Second, we could special case the "limiting" condition of dmin == dmax && smin == smax
and set resolution to 1 there.
@kleinschmidt good points! In this case it is only how about this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better make sure the values are round-trippable...
Co-authored-by: Dave Kleinschmidt <[email protected]>
Co-authored-by: Dave Kleinschmidt <[email protected]>
Co-authored-by: Dave Kleinschmidt <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phew looks good!
Encountered during testing in a closed-source repo.
Without this fix, we get