9a3cf7ff00c081ff394f62dceae1c3d8d199d9e4,mir_eval/tempo.py,,validate,#,22

Before Change


            Thrown when the provided annotations are not valid.
    """
    // If reference or estimated onsets are empty, warn because metric will be 0
    if reference_onsets.size == 0:
        warnings.warn("Reference onsets are empty.")
    if estimated_onsets.size == 0:
        warnings.warn("Estimated onsets are empty.")
    for onsets in [reference_onsets, estimated_onsets]:
        util.validate_events(onsets, MAX_TIME)

After Change


    if reference_tempi.size != 2:
        raise ValueError("Reference tempi must have two values.")
    
    if estimated_tempi.size != 2:
        raise ValueError("Estimated tempi must have two values.")
    
    if np.any(reference_tempi <= 0):
        warnings.warn("Detected non-positive reference tempo")

    if reference_weight < 0 or reference_weight > 1:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: craffel/mir_eval
Commit Name: 9a3cf7ff00c081ff394f62dceae1c3d8d199d9e4
Time: 2014-10-25
Author: brian.mcfee@nyu.edu
File Name: mir_eval/tempo.py
Class Name:
Method Name: validate


Project Name: pymanopt/pymanopt
Commit Name: e7ec8ec2e3d51a0f139a9ee08a6d491921e8c380
Time: 2016-02-16
Author: niklas.koep@gmail.com
File Name: pymanopt/tools/autodiff/autodiff.py
Class Name:
Method Name: compile


Project Name: chartbeat-labs/textacy
Commit Name: db3deb22ff32f40ba446149946b4f0d47ba2fed2
Time: 2019-07-14
Author: burtdewilde@gmail.com
File Name: textacy/similarity.py
Class Name:
Method Name: jaccard