f2923023825046cfc16e05190796914215b9ee12,tests/test_hypersphere.py,TestHypersphereMethods,test_closest_neighbor,#TestHypersphereMethods#,417

Before Change


        closest_neighbor = points[index, :]
        result = False
        for i in range(n_samples):
            if gs.allclose(points[i, :], closest_neighbor):
                result = True
                break
        self.assertTrue(result)

    def test_sample_von_mises_fisher(self):
        

After Change


        neighbors = points[1:, :]
        index = self.metric.closest_neighbor_index(point, neighbors)
        closest_neighbor = points[index, :]
        test = gs.where((points == closest_neighbor).all(axis=1))
        result = test[0].size > 0
        self.assertTrue(result)

    def test_sample_von_mises_fisher(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: geomstats/geomstats
Commit Name: f2923023825046cfc16e05190796914215b9ee12
Time: 2018-09-18
Author: alice.le-brigant@enac.fr
File Name: tests/test_hypersphere.py
Class Name: TestHypersphereMethods
Method Name: test_closest_neighbor


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 9f5eff8c070ad7734b0d5e9a2a2dcc45efab0a96
Time: 2018-12-10
Author: M.N.Tran@ibm.com
File Name: art/attacks/deepfool.py
Class Name: DeepFool
Method Name: generate


Project Name: scikit-learn-contrib/DESlib
Commit Name: a5506499ce55b5d568af4674cabaaa16f8497d9f
Time: 2018-01-11
Author: rafaelmenelau@gmail.com
File Name: pythonds/des/knora_e.py
Class Name: KNORAE
Method Name: estimate_competence