b127d30a0a0a3d3d7ad94dd629d2e673b6477cc8,scipy/spatial/_spherical_voronoi.py,SphericalVoronoi,_calc_vertices_regions,#SphericalVoronoi#,264

Before Change


        )

        // calculate regions from triangulation
        self.regions = [[k for k in range(0, len(self._tri.simplices))
                         if n in self._tri.simplices[k]]
                        for n in range(0, len(self.points))]

    def sort_vertices_of_regions(self):
        

After Change


        )

        // calculate regions from triangulation
        generator_indices = np.arange(self.points.shape[0])
        filter_tuple = np.where((np.expand_dims(self._tri.simplices
            , -1) == generator_indices).any(axis=1))
            
        list_tuples_associations = zip(filter_tuple[1],
                filter_tuple[0]) 
        list_tuples_associations = sorted(list_tuples_associations,
                key = lambda t: t[0]) 
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: scipy/scipy
Commit Name: b127d30a0a0a3d3d7ad94dd629d2e673b6477cc8
Time: 2016-02-16
Author: tyler.je.reddy@gmail.com
File Name: scipy/spatial/_spherical_voronoi.py
Class Name: SphericalVoronoi
Method Name: _calc_vertices_regions


Project Name: snorkel-team/snorkel
Commit Name: 0514d4b6de97d652e6cd99c7b557018890a6ec99
Time: 2017-06-26
Author: ajratner@gmail.com
File Name: snorkel/learning/disc_learning.py
Class Name: TFNoiseAwareModel
Method Name: train


Project Name: tensorly/tensorly
Commit Name: 4d96f8c9a0c98df0a422cc498b86a6b5563f5b49
Time: 2020-08-06
Author: jean.kossaifi@gmail.com
File Name: tensorly/decomposition/candecomp_parafac.py
Class Name:
Method Name: parafac


Project Name: enthought/chaco
Commit Name: 3d535702dc92b55d6bc8cc0c02d45d98c439b733
Time: 2008-12-01
Author: bhendrix@651a555e-23ca-0310-84fe-ca9f7c59d2ea
File Name: enthought/chaco/scatterplot.py
Class Name: ScatterPlot
Method Name: _gather_points_old