tsdive.switchback.schedule_blocks
¶
schedule_blocks(span: float, length: float) -> int
K = floor(span / length), less one when it is odd.
Examples:
>>> from tsdive.switchback import schedule_blocks
>>> schedule_blocks(24 * 3600, 3600), schedule_blocks(7 * 3600, 3600)
(24, 6)