4b84a531f53c4e1a3085e18ed3787ba82416a700,lib/matplotlib/transforms.py,Transform,__init_subclass__,#Any#,1228

Before Change


    def __init_subclass__(cls):
        // 1d transforms are always separable; we assume higher-dimensional ones
        // are not but subclasses can also directly set is_separable.
        if ("is_separable" not in vars(cls)  // Was it overridden explicitly?
                and cls.input_dims == cls.output_dims == 1):
            cls.is_separable = True
        // Transform.inverted raises NotImplementedError; we assume that if this

After Change


        // are not but subclasses can also directly set is_separable -- this is
        // verified by checking whether "is_separable" appears more than once in
        // the class"s MRO (it appears once in Transform).
        if (sum("is_separable" in vars(parent) for parent in cls.__mro__) == 1
                and cls.input_dims == cls.output_dims == 1):
            cls.is_separable = True
        // Transform.inverted raises NotImplementedError; we assume that if this
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: matplotlib/matplotlib
Commit Name: 4b84a531f53c4e1a3085e18ed3787ba82416a700
Time: 2019-08-06
Author: anntzer.lee@gmail.com
File Name: lib/matplotlib/transforms.py
Class Name: Transform
Method Name: __init_subclass__


Project Name: facebookresearch/Horizon
Commit Name: f4c12f1655e02c6911ab58dd92f8689204384ade
Time: 2020-06-04
Author: wangkaiwen998@gmail.com
File Name: reagent/optimizer/scheduler.py
Class Name: LearningRateSchedulerConfig
Method Name: make_from_optimizer


Project Name: NifTK/NiftyNet
Commit Name: 165207a79dafcf658f483d26ccffd9e982389dcc
Time: 2018-05-01
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/image_reader.py
Class Name: ImageReader
Method Name: initialise