41f16ad810d2dfe0906d204cd9e777acdc89943f,dit/validate.py,,validate_outcome_class,#Any#,230

Before Change



    
    // Make sure the class is the same for all outcomes.
    classattr = lambda x: getattr(x, "__class__")
    classes = list(map(classattr, outcomes))
    equal_classes = np.alltrue(np.equal(classes, outcomes[0].__class__))
    if not equal_classes:
        raise ditException("Not all outcomes have the same class.")
    else:

After Change



    
    // Make sure the class is the same for all outcomes.
    equal_classes = all(outcomes[0].__class__ == outcome.__class__
                        for outcome in outcomes)

    if not equal_classes:
        raise ditException("Not all outcomes have the same class.")
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dit/dit
Commit Name: 41f16ad810d2dfe0906d204cd9e777acdc89943f
Time: 2018-01-30
Author: kokokostation@gmail.com
File Name: dit/validate.py
Class Name:
Method Name: validate_outcome_class


Project Name: pgmpy/pgmpy
Commit Name: ca25da7c55ba436ab557410d5f2e2e9b557d2840
Time: 2015-03-02
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/models/MarkovModel.py
Class Name: MarkovModel
Method Name: to_junction_tree


Project Name: nipy/dipy
Commit Name: defee23185b16afd836bad0a6cce7f791328666e
Time: 2020-02-03
Author: skab12@gmail.com
File Name: dipy/workflows/multi_io.py
Class Name: IOIterator
Method Name: file_existence_check