Returns the indices where the given period changes. Parameters ---------- dates : PeriodIndex Array of intervals to monitor. period : str Name of the period to monitor.
(dates: PeriodIndex, period: str)
| 498 | |
| 499 | |
| 500 | def _period_break(dates: PeriodIndex, period: str) -> npt.NDArray[np.intp]: |
| 501 | """ |
| 502 | Returns the indices where the given period changes. |
| 503 | |
| 504 | Parameters |
| 505 | ---------- |
| 506 | dates : PeriodIndex |
| 507 | Array of intervals to monitor. |
| 508 | period : str |
| 509 | Name of the period to monitor. |
| 510 | """ |
| 511 | mask = _period_break_mask(dates, period) |
| 512 | return np.nonzero(mask)[0] |
| 513 | |
| 514 | |
| 515 | def _period_break_mask(dates: PeriodIndex, period: str) -> npt.NDArray[np.bool_]: |
no test coverage detected