670b85c9e9cec05210e8596bc1fb9ca66787162f,sklearn/compose/_column_transformer.py,ColumnTransformer,get_feature_names,#ColumnTransformer#,345

Before Change


                    hasattr(column, "__len__") and not len(column)):
                continue
            elif trans == "passthrough":
                raise NotImplementedError(
                    "get_feature_names is not yet supported when using "
                    "a "passthrough" transformer.")
            elif not hasattr(trans, "get_feature_names"):
                raise AttributeError("Transformer %s (type %s) does not "
                                     "provide get_feature_names."
                                     % (str(name), type(trans).__name__))

After Change


                    hasattr(column, "__len__") and not len(column)):
                continue
            if trans == "passthrough":
                if hasattr(self, "_df_columns"):
                    if ((not isinstance(column, slice))
                            and all(isinstance(col, str) for col in column)):
                        feature_names.extend(column)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: scikit-learn/scikit-learn
Commit Name: 670b85c9e9cec05210e8596bc1fb9ca66787162f
Time: 2020-04-19
Author: 50599110+lrjball@users.noreply.github.com
File Name: sklearn/compose/_column_transformer.py
Class Name: ColumnTransformer
Method Name: get_feature_names


Project Name: havakv/pycox
Commit Name: fdf356a91622033dc8e88ccf64c2f421e9d3a8a8
Time: 2018-02-27
Author: kvamme@samba8.ad.nr.no
File Name: pycox/cox.py
Class Name: CoxTime
Method Name: predict_cumulative_hazard_at_times


Project Name: scikit-learn/scikit-learn
Commit Name: d2cd2540418d3ff66b324ec18566dbe0b5991b40
Time: 2020-09-10
Author: norbert@preining.info
File Name: sklearn/neural_network/_multilayer_perceptron.py
Class Name: MLPClassifier
Method Name: _validate_input