399333535b40002e7e6527edb521fad86e3b6a4a,scipy/spatial/tests/test_kdtree.py,ball_consistency,test_in_ball,#ball_consistency#,279
Before Change
d = np.broadcast_to(self.d, x.shape[:-1])
l = self.T.query_ball_point(x, self.d, p=self.p, eps=self.eps)
for i, ind in enumerate(l):
assert_(np.all(self.distance(self.data[ind], x[i],self.p) <= d[i]*(1.+self.eps)))
def test_found_all(self):
x = np.atleast_2d(self.x)
d = np.broadcast_to(self.d, x.shape[:-1])
After Change
l = self.T.query_ball_point(x, self.d, p=self.p, eps=self.eps)
for i, ind in enumerate(l):
dist = self.distance(self.data[ind], x[i],self.p) - d[i]*(1.+self.eps)
norm = self.distance(self.data[ind], x[i],self.p) + d[i]*(1.+self.eps)
assert_array_equal(dist < self.tol * norm, True )
def test_found_all(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: scipy/scipy
Commit Name: 399333535b40002e7e6527edb521fad86e3b6a4a
Time: 2019-03-07
Author: rainwoodman@gmail.com
File Name: scipy/spatial/tests/test_kdtree.py
Class Name: ball_consistency
Method Name: test_in_ball
Project Name: biocore/scikit-bio
Commit Name: 3759071e383eeda2cb165dee55abe21a8eeeac53
Time: 2015-02-18
Author: chasejohnh@gmail.com
File Name: skbio/sequence/tests/test_sequence.py
Class Name: BiologicalSequenceTests
Method Name: test_distance_unequal_length
Project Name: scipy/scipy
Commit Name: 399333535b40002e7e6527edb521fad86e3b6a4a
Time: 2019-03-07
Author: rainwoodman@gmail.com
File Name: scipy/spatial/tests/test_kdtree.py
Class Name: ball_consistency
Method Name: test_found_all