Count scheduler timesteps that fall within (low, high) exclusive.
(pipe, low, high)
| 194 | |
| 195 | |
| 196 | def _count_steps_in_range(pipe, low, high): |
| 197 | """Count scheduler timesteps that fall within (low, high) exclusive.""" |
| 198 | timesteps = getattr(getattr(pipe, 'scheduler', None), 'timesteps', None) |
| 199 | if timesteps is None: |
| 200 | return 1 |
| 201 | count = sum(1 for t in timesteps.tolist() if low < t < high) |
| 202 | return max(count, 1) |
| 203 | |
| 204 | |
| 205 | def _count_steps_below(pipe, threshold): |
no outgoing calls
no test coverage detected