pyinterp.core.period.PeriodList.cross_a_period#
- PeriodList.cross_a_period(self, dates: object) numpy.ndarray[dtype=bool, shape=(*), order='C']#
Identify dates that cross (enter or are within) any managed period.
For each input date, determines whether it either:
Falls inside one of the periods, OR
Has at least one period beginning at or after it (before the last input date)
This effectively identifies dates that “encounter” a period in the temporal sequence, excluding only those dates that come after all periods have ended.
- Parameters:
dates – Vector of dates to check (should be sorted for optimal performance).
- Returns:
A vector of booleans where true indicates the date crosses a period.
Note
If the last date in the input falls within a period, all dates are marked as true since they all precede or coincide with a period.