Skip to content

Conversation

@Edhain
Copy link

@Edhain Edhain commented Nov 5, 2024

  • Fixed AttributeError in voronoi_neighbors function: replaced tri.vertices with tri.simplices to match updated SciPy Delaunay API.

  • Updated voronoi_plot_2d to use np.ptp(vor.points, axis=0) instead of ptp method, aligning with changes in NumPy 2.0.

These changes resolve errors when running the --filter-voronoi option and ensure compatibility with the latest SciPy and NumPy versions.

Delaunay object in SciPy's scipy.spatial module no longer has an attribute called vertices. This attribute was deprecated in recent versions of SciPy and has been replaced by simplices.
ptp was removed from the ndarray class in NumPy 2.0. The solution is to replace vor.points.ptp(axis=0) with np.ptp(vor.points, axis=0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant