Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vmodel/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def voronoi_neighbors(positions: np.ndarray) -> list:
"""
tri = Delaunay(positions)
neighbors = defaultdict(set)
for p in tri.vertices:
for p in tri.simplices:
for i, j in combinations(p, 2):
neighbors[i].add(j)
neighbors[j].add(i)
Expand Down
2 changes: 1 addition & 1 deletion vmodel/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def voronoi_plot_2d(vor, ax=None, **kw):
line_style = kw.get('line_style', 'solid')

center = vor.points.mean(axis=0)
ptp_bound = vor.points.ptp(axis=0)
ptp_bound = np.ptp(vor.points, axis=0))

finite_segments = []
infinite_segments = []
Expand Down