8aa27bbac3e52d7f214ba22028afcbd4cf13b97d,scipy/spatial/kdtree.py,KDTree,query_ball_point,#KDTree#Any#Any#Any#Any#,575
Before Change
x = np.asarray(x)
if x.dtype.kind == "c":
raise TypeError("KDTree does not work with complex data")
if x.shape[-1] != self.m:
raise ValueError("Searching for a %d-dimensional point in a "
"%d-dimensional KDTree" % (x.shape[-1], self.m))
if len(x.shape) == 1:
return self.__query_ball_point(x, r, p, eps)
else:
retshape = x.shape[:-1]
result = np.empty(retshape, dtype=object)
for c in np.ndindex(retshape):
result[c] = self.__query_ball_point(x[c], r, p=p, eps=eps)
return result
def query_ball_tree(self, other, r, p=2., eps=0):
Find all pairs of points between `self` and `other` whose distance is at most r
After Change
x = np.asarray(x)
if x.dtype.kind == "c":
raise TypeError("KDTree does not work with complex data")
return super ().query_ball_point(x, r, p, eps)
def query_ball_tree(self, other, r, p=2., eps=0):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: scipy/scipy
Commit Name: 8aa27bbac3e52d7f214ba22028afcbd4cf13b97d
Time: 2020-07-07
Author: peterbell10@live.co.uk
File Name: scipy/spatial/kdtree.py
Class Name: KDTree
Method Name: query_ball_point
Project Name: masa-su/pixyz
Commit Name: 93f48439ec56f3da6b2633bd8197b8dcc902833d
Time: 2019-11-25
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/exponential_distributions.py
Class Name: RelaxedBernoulli
Method Name: set_dist
Project Name: masa-su/pixyz
Commit Name: 93f48439ec56f3da6b2633bd8197b8dcc902833d
Time: 2019-11-25
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/exponential_distributions.py
Class Name: RelaxedCategorical
Method Name: set_dist