3d12c536e66ff4414860b8de1467fe56ede54063,thinc/neural/_classes/model.py,Model,define_operators,#,39

Before Change


            print(model + other)
            // Raises TypeError --- binding limited to scope of with block.
        
        old_ops = dict(cls._operators)
        for op, func in operators.items():
            cls._operators[op] = func
        yield
        cls._operators = old_ops

After Change


            print(model + other)
            // Raises TypeError --- binding limited to scope of with block.
        
        curr_operators = dict(getattr(cls._thread_local, "operators", {}))
        cls._thread_local.operators = dict(operators)
        yield
        cls._thread_local.operators = dict(curr_operators)

    @classmethod
    @contextlib.contextmanager
    def use_device(cls, device):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: explosion/thinc
Commit Name: 3d12c536e66ff4414860b8de1467fe56ede54063
Time: 2019-11-28
Author: adrianeboyd@gmail.com
File Name: thinc/neural/_classes/model.py
Class Name: Model
Method Name: define_operators


Project Name: neuropsychology/NeuroKit.py
Commit Name: cfd6bac15bae8a42cac9453baff3ef8022798e20
Time: 2017-08-28
Author: dom.mak19@gmail.com
File Name: neurokit/eeg/eeg_data.py
Class Name:
Method Name: eeg_to_all_evokeds


Project Name: ex4sperans/mag
Commit Name: 3170963bbf76399531ee6746bf34b8889a3fdfa1
Time: 2020-11-15
Author: d.danevskyi@gmail.com
File Name: maggot/__main__.py
Class Name:
Method Name:


Project Name: GRAAL-Research/pytoune
Commit Name: 1404a9edb15c8d615488781cf73e7a971ade71f8
Time: 2020-05-09
Author: fredy_14@live.fr
File Name: poutyne/framework/metrics/epoch_metrics/__init__.py
Class Name:
Method Name:


Project Name: enthought/chaco
Commit Name: cf02b9876b9045c7f633e223903fb8a7b94c5be7
Time: 2011-06-15
Author: ischnell@enthought.com
File Name: setup.py
Class Name:
Method Name: