2fae6da1537c67778da075a238d8fb3364cd2471,nilmtk/stats/electricity/single.py,,_indicies_of_periods,#,241

Before Change



    // 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 = {}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nilmtk/nilmtk
Commit Name: 2fae6da1537c67778da075a238d8fb3364cd2471
Time: 2013-12-19
Author: jack-list@xlk.org.uk
File Name: nilmtk/stats/electricity/single.py
Class Name:
Method Name: _indicies_of_periods


Project Name: librosa/librosa
Commit Name: 7faab20caee8d81f82ea323c675dd7fd3a983942
Time: 2014-01-23
Author: brm2132@columbia.edu
File Name: librosa/core.py
Class Name:
Method Name: stft


Project Name: scikit-image/scikit-image
Commit Name: 15c2dc92f8c57b278317676e55600d4069660cea
Time: 2020-02-19
Author: mail@uweschmidt.org
File Name: skimage/segmentation/_join.py
Class Name:
Method Name: relabel_sequential