564c92947efc1707287cd63e1379ffcac2813b5a,mltsp/TCP/Software/feature_extract/Code/feature_interfaces.py,FeatureInterface,find_extname,#FeatureInterface#Any#Any#,129

Before Change


    def find_extname(self,extractor_name, index = False): // linked if want to modify the array directly
        extractor_index = where(self.available_extractors["extname"] ==\
                                extractor_name.encode("utf-8"))[0]
        if size(extractor_index) is 0:
            print("find_extname couldn"t find extractor %s" % \
                                                    (extractor_name))
            return False // if we didn"t find the object
        if index:
            return extractor_index[0]
        extractor_row = self.available_extractors[extractor_index][0] // return the corresponding extractor row (extname, extractor and active)
        return extractor_row

After Change


    def find_extname(self, extractor_name, index = False): // linked if want to modify the array directly
        extractors = self.available_extractors["extname"].tolist()

        try:
            ix = extractors.index(extractor_name.encode("utf-8"))
        except ValueError:
            print("find_extname couldn"t find extractor %s" % \
                                                    (extractor_name))
            return False // if we didn"t find the object

        if index:
            return ix

        extractor_row = self.available_extractors[ix] // return the corresponding extractor row (extname, extractor and active)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: cesium-ml/cesium
Commit Name: 564c92947efc1707287cd63e1379ffcac2813b5a
Time: 2015-01-23
Author: stefan@sun.ac.za
File Name: mltsp/TCP/Software/feature_extract/Code/feature_interfaces.py
Class Name: FeatureInterface
Method Name: find_extname


Project Name: cornellius-gp/gpytorch
Commit Name: 5ae7e24308aa3da597e27bae3f4e6ea28630654f
Time: 2019-03-18
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/interpolated_lazy_tensor.py
Class Name: InterpolatedLazyTensor
Method Name: __init__


Project Name: cornellius-gp/gpytorch
Commit Name: b2951813547426828d313a80c52de8a619e99731
Time: 2018-11-26
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/constant_mul_lazy_tensor.py
Class Name: ConstantMulLazyTensor
Method Name: __init__