the-siesta-group / edfio

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

Use `math.isclose()` for comparison with tolerance #24

Closed hofaflo closed 7 months ago

hofaflo commented 7 months ago
          > Instead of rolling your own tolerant comparison, I would suggest to use [`math.isclose()`](https://docs.python.org/3/library/math.html#math.isclose) instead.

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

Originally posted by @hofaflo in https://github.com/the-siesta-group/edfio/issues/15#issuecomment-1851787780