(time_unit, times)
| 2173 | |
| 2174 | |
| 2175 | def _check_time_unit(time_unit, times): |
| 2176 | if not isinstance(time_unit, str): |
| 2177 | raise TypeError(f"time_unit must be str, got {type(time_unit)}") |
| 2178 | if time_unit == "s": |
| 2179 | pass |
| 2180 | elif time_unit == "ms": |
| 2181 | times = 1e3 * times |
| 2182 | else: |
| 2183 | raise ValueError(f"time_unit must be 's' or 'ms', got {time_unit!r}") |
| 2184 | return time_unit, times |
| 2185 | |
| 2186 | |
| 2187 | def _plot_masked_image( |
no outgoing calls
no test coverage detected