d8c16fb43372826fa3b24d4b166edb2cef7aa96a,statsmodels/discrete/discrete_model.py,,_numpy_to_dummies,#Any#,112

Before Change


    if endog.dtype.kind in ["S", "O"]:
        endog_dummies, ynames = tools.categorical(endog, drop=True,
                                                  dictnames=True)
    elif endog.ndim == 2:
        endog_dummies = endog
        ynames = range(endog.shape[1])
    else:

After Change


        endog_dummies = endog
        ynames = range(endog.shape[1])
    else:
        dummies = get_dummies(endog, drop_first=False)
        ynames = {i: dummies.columns[i] for i in range(dummies.shape[1])}
        endog_dummies = np.asarray(dummies, dtype=float)

        return endog_dummies, ynames
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: statsmodels/statsmodels
Commit Name: d8c16fb43372826fa3b24d4b166edb2cef7aa96a
Time: 2020-07-24
Author: kevin.k.sheppard@gmail.com
File Name: statsmodels/discrete/discrete_model.py
Class Name:
Method Name: _numpy_to_dummies


Project Name: bashtage/linearmodels
Commit Name: 34e7e918bd4fc09f643e8bb448e875a9bcb7e841
Time: 2017-03-29
Author: kevin.k.sheppard@gmail.com
File Name: experiment.py
Class Name:
Method Name:


Project Name: bambinos/bambi
Commit Name: 770b83f31c59b71b6b4507d01008cd6d886fcb47
Time: 2016-08-11
Author: tyarkoni@gmail.com
File Name: bambi/models.py
Class Name: Model
Method Name: add_term