Cannot build KDTree
Closed this issue · 1 comments
pongloongyeat commented
Hi, I cloned this repo and was looking through the codes and I tried running them but I cannot build the KDTree.
in gaussian_filter_density(gt)
10 leafsize = 2048
11 # build kdtree
---> 12 tree = scipy.spatial.KDTree(pts.copy(), leafsize=leafsize)
13 # query kdtree
14 distances, locations = tree.query(pts, k=4)
~/.local/lib/python3.8/site-packages/scipy/spatial/kdtree.py in __init__(self, data, leafsize)
242 def __init__(self, data, leafsize=10):
243 self.data = np.asarray(data)
--> 244 self.n, self.m = np.shape(self.data)
245 self.leafsize = int(leafsize)
246 if self.leafsize < 1:
ValueError: not enough values to unpack (expected 2, got 0)
During debug I checked and found that pts.shape returned ().
pongloongyeat commented
Nevermind I fixed it. I don't know how but I did.