f2cfa5fb8e73229a1757acbcc94bab13099de439,PyPi/utils/spaces.py,MultiDiscrete,get_idx,#MultiDiscrete#Any#,84

Before Change


    def get_idx(self, value):
        idx = list()
        for s, v in enumerate(value):
            idx.append(np.argwhere(
                self.discrete_spaces[s].values == v).ravel()[0])

        return idx

After Change


                self.discrete_spaces[i]._idxs[v] for i, v in enumerate(value)]
        elif value.ndim == 2:
            idxs = list()
            for v in value:
                idx = [
                    self.discrete_spaces[i]._idxs[v1] for i, v1 in enumerate(v)]
                idxs.append(idx)
        else:
            raise ValueError("Wrong dimension for indices array.")

        return np.array(idxs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 4

Instances


Project Name: AIRLab-POLIMI/mushroom
Commit Name: f2cfa5fb8e73229a1757acbcc94bab13099de439
Time: 2017-06-05
Author: carlo.deramo@gmail.com
File Name: PyPi/utils/spaces.py
Class Name: MultiDiscrete
Method Name: get_idx


Project Name: sebp/scikit-survival
Commit Name: 15475b857c7d547f1f44690fe10c3f672cc919fb
Time: 2019-07-18
Author: sebp@k-d-w.org
File Name: sksurv/ensemble/boosting.py
Class Name: GradientBoostingSurvivalAnalysis
Method Name: staged_predict


Project Name: scikit-learn/scikit-learn
Commit Name: f685547f801b13afc0874ed348e3a46600113136
Time: 2020-06-17
Author: alexhenrie24@gmail.com
File Name: sklearn/neural_network/_multilayer_perceptron.py
Class Name: BaseMultilayerPerceptron
Method Name: _backprop


Project Name: nilearn/nilearn
Commit Name: 3daedc17ddab948752f3d6b90e56b177ea77ec42
Time: 2014-02-26
Author: virgile.fritsch@gmail.com
File Name: nilearn/mass_univariate/permuted_least_squares.py
Class Name:
Method Name: permuted_ols


Project Name: biolab/orange3
Commit Name: 3721aada353b474d5b5ce726fa65de4968fb6b5e
Time: 2013-06-02
Author: jure.zbontar@gmail.com
File Name: Orange/classification/logistic.py
Class Name:
Method Name: