-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Currently TimeType casts float to TimeType for comparisons. This leads to crashes when doing something like TimeType.from_float(1.1) < float('inf')
because infinity cannot be represented as an integer fraction. The error message is not clear because it only says ValueError: invalid digits
.
Should we have a max time? somewhing like 1e30ns
which is a few orders of magnitude larger than the age of the universe. If one creates a TimeType with a larger absolute value qupulse does no longer garantuee corectness.
- Better error message if a non-finite float(NaN, inf, -inf) is encountered.
- Do not convert other value to
TimeType
by default for comparisons.
Metadata
Metadata
Assignees
Labels
No labels