Skip to content

Commit 272f72f

Browse files
committed
pad bin in nn search
1 parent 359bdb3 commit 272f72f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gstatsim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def nearest_neighbor_search(radius, num_points, loc, data2):
318318
data = data[data.dist < radius]
319319
data = data.sort_values('dist', ascending = True)
320320
bins = [-math.pi, -3*math.pi/4, -math.pi/2, -math.pi/4, 0,
321-
math.pi/4, math.pi/2, 3*math.pi/4, math.pi]
321+
math.pi/4, math.pi/2, 3*math.pi/4, math.pi+1e-3]
322322
data["Oct"] = pd.cut(data.angles, bins = bins, labels = list(range(8)))
323323
oct_count = num_points // 8
324324
smallest = np.ones(shape=(num_points, 3)) * np.nan

0 commit comments

Comments
 (0)