// Find the minimum sample period.
// For the sake of speed, only use the first 100 samples.
FWD_DIFF = np.diff(datetime_index.values[:100]).astype(np.float)
MIN_SAMPLE_PERIOD = FWD_DIFF.min() / 1E9
MAX_SAMPLES_PER_PERIOD = _secs_per_period_alias(freq) / MIN_SAMPLE_PERIOD
MAX_SAMPLES_PER_2_PERIODS = MAX_SAMPLES_PER_PERIOD * 2
n_rows_processed = 0
After Change
// during the loop...
// Find the minimum sample period.
MIN_SAMPLE_PERIOD = int(sample_period(datetime_index))
MAX_SAMPLES_PER_PERIOD = int(_secs_per_period_alias(freq) / MIN_SAMPLE_PERIOD)
MAX_SAMPLES_PER_2_PERIODS = MAX_SAMPLES_PER_PERIOD * 2
n_rows_processed = 0
boundaries = {}