the-siesta-group / edfio

Read and write EDF/EDF+ files.
Apache License 2.0
25 stars 5 forks source link

Round in calculation of signal durations to avoid floating point issues #15

Closed hofaflo closed 7 months ago

cbrnr commented 7 months ago

Instead of rolling your own tolerant comparison, I would suggest to use math.isclose() instead.

hofaflo commented 7 months ago

Instead of rolling your own tolerant comparison, I would suggest to use math.isclose() instead.

Thanks for the suggestion, I did not know about this! We can use this in EdfSignal._get_expected_new_length.