f373fff0861a23f1fb4a82a108cbd7817761083d,linearmodels/panel/model.py,PanelOLS,from_formula,#Any#Any#,152

Before Change


    def from_formula(formula, data):
        na_action = NAAction(on_NA="raise", NA_types=[])
        data = PanelData(data)
        parts = formula.split("~")
        parts[1] = " 0 + " + parts[1]
        parts[1], entity_effect = PanelOLS._parse_effect(parts[1], "EntityEffect")
        parts[1], fixed_effect = PanelOLS._parse_effect(parts[1], "FixedEffect")
        if entity_effect and fixed_effect:
            raise ValueError("Cannot use both FixedEffect and EntityEffect")
        entity_effect |= fixed_effect

After Change


        rm_list = []
        effects = {"EntityEffect":False, "FixedEffect":False, "TimeEffect":False}
        for term in mod_descr.rhs_termlist:
            if term.name() in effects:
                effects[term.name()] = True
                rm_list.append(term)
        for term in rm_list:
            mod_descr.rhs_termlist.remove(term)

        if effects["EntityEffect"] and effects["FixedEffect"]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: bashtage/linearmodels
Commit Name: f373fff0861a23f1fb4a82a108cbd7817761083d
Time: 2017-03-24
Author: kevin.k.sheppard@gmail.com
File Name: linearmodels/panel/model.py
Class Name: PanelOLS
Method Name: from_formula


Project Name: HyperGAN/HyperGAN
Commit Name: 16be55ed98340f9494b2eadb565dc18d6cf47d9c
Time: 2017-06-10
Author: martyn@255bits.com
File Name: hypergan/cli.py
Class Name: CLI
Method Name: __init__


Project Name: pyinstaller/pyinstaller
Commit Name: 336638affd7687ffa272ea75a4a6f838dc9c598a
Time: 2015-10-25
Author: h.goebel@crazy-compilers.com
File Name: PyInstaller/depend/utils.py
Class Name:
Method Name: _resolveCtypesImports


Project Name: bokeh/bokeh
Commit Name: f82ba26ddda1bf5ccffa2f40707c673f2ee1892f
Time: 2017-06-20
Author: bryanv@continuum.io
File Name: bokeh/plotting/helpers.py
Class Name:
Method Name: _add_sigfunc_info