633ff8ba668b74844b3ae9915d1b4510d91ea69b,scipy/spatial/spherical_voronoi.py,SphericalVoronoi,__init__,#SphericalVoronoi#Any#Any#Any#,347

Before Change


            self.original_point_array = points
        self.sphere_centroid = np.zeros((3,)) //already at origin, or has been moved to origin
        if not sphere_radius:
            self.estimated_sphere_radius = np.average(scipy.spatial.distance.cdist(self.original_point_array,self.sphere_centroid[np.newaxis,:]))
        else: 
            self.estimated_sphere_radius = sphere_radius //if the radius of the sphere is known, it is pobably best to specify to avoid centroid bias in radius estimation, etc.

    def delaunay_triangulation_spherical_surface(self):

After Change


        if radius:
            self.radius = radius
        else:
            self.radius = np.average(
                scipy.spatial.distance.cdist(self.generators,
                                             np.zeros((3,))[np.newaxis, :]))

    def delaunay_triangulation_spherical_surface(self):
        """Delaunay tessellation of the points on the surface of the sphere. This is simply the 3D convex hull of the points. Returns a shape (N,3,3) array of points representing the vertices of the Delaunay triangulation on the sphere (i.e., N three-dimensional triangle vertex arrays)."""
        hull = scipy.spatial.ConvexHull(self.generators)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 3

Instances


Project Name: scipy/scipy
Commit Name: 633ff8ba668b74844b3ae9915d1b4510d91ea69b
Time: 2016-02-16
Author: mail@nikno.de
File Name: scipy/spatial/spherical_voronoi.py
Class Name: SphericalVoronoi
Method Name: __init__


Project Name: mne-tools/mne-python
Commit Name: 56511470c630305ef84895ee6e80043dbecfe8e2
Time: 2018-11-15
Author: larson.eric.d@gmail.com
File Name: tutorials/plot_brainstorm_phantom_elekta.py
Class Name:
Method Name:


Project Name: yzhao062/pyod
Commit Name: 11954035dc2c24ad400db96bf22f61fb142a3c1a
Time: 2018-09-07
Author: yuezhao@cs.toronto.edu
File Name: pyod/models/feature_bagging.py
Class Name: FeatureBagging
Method Name: decision_function


Project Name: neuropsychology/NeuroKit.py
Commit Name: cfd6bac15bae8a42cac9453baff3ef8022798e20
Time: 2017-08-28
Author: dom.mak19@gmail.com
File Name: neurokit/eeg/eeg_data.py
Class Name:
Method Name: eeg_to_all_evokeds


Project Name: scikit-learn/scikit-learn
Commit Name: 936854579a3cc112f0686e397798d2aa73e5fab3
Time: 2020-05-24
Author: swierh@users.noreply.github.com
File Name: sklearn/metrics/_regression.py
Class Name:
Method Name: mean_squared_error


Project Name: jsalt18-sentence-repl/jiant
Commit Name: 9a4540b682074d3f84a2fc232cf2a832dc96bce7
Time: 2018-01-19
Author: wang.alex.c@gmail.com
File Name: src/aggregate_results.py
Class Name:
Method Name: latexify