cupyx.scipy.spatial.Delaunay#

class cupyx.scipy.spatial.Delaunay(points, furthest_site=False, incremental=False)[source]#

Delaunay tessellation in 2 dimensions.

Parameters:
  • points (ndarray of floats, shape (npoints, ndim)) – Coordinates of points to triangulate

  • furthest_site (bool, optional) – Whether to compute a furthest-site Delaunay triangulation. This option will be ignored, since it is not supported by CuPy Default: False

  • incremental (bool, optional) – Allow adding new points incrementally. This takes up some additional resources. This option will be ignored, since it is not supported by CuPy. Default: False

Variables:
  • points (ndarray of double, shape (npoints, ndim)) – Coordinates of input points.

  • simplices (ndarray of ints, shape (nsimplex, ndim+1)) – Indices of the points forming the simplices in the triangulation. For 2-D, the points are oriented counterclockwise.

  • neighbors (ndarray of ints, shape (nsimplex, ndim+1)) – Indices of neighbor simplices for each simplex. The kth neighbor is opposite to the kth vertex. For simplices at the boundary, -1 denotes no neighbor.0

  • vertex_neighbor_vertices (tuple of two ndarrays of int; (indptr, indices)) – Neighboring vertices of vertices. The indices of neighboring vertices of vertex k are indices[indptr[k]:indptr[k+1]].

Notes

This implementation makes use of GDel2D to perform the triangulation in 2D. See [1] for more information.

References

Methods

find_simplex(xi, bruteforce=False, tol=None)[source]#

Find the simplices containing the given points.

Parameters:
  • xi (ndarray of double, shape (..., ndim)) – Points to locate

  • bruteforce (bool, optional) – Whether to only perform a brute-force search. Not used by CuPy

  • tol (float, optional) – Tolerance allowed in the inside-triangle check. Default is 100*eps.

Returns:

i – Indices of simplices containing each point. Points outside the triangulation get the value -1.

Return type:

ndarray of int, same shape as xi

vertex_neighbor_vertices()[source]#

Neighboring vertices of vertices.

Tuple of two ndarrays of int: (indptr, indices). The indices of neighboring vertices of vertex k are indices[indptr[k]:indptr[k+1]].

__eq__(value, /)#

Return self==value.

__ne__(value, /)#

Return self!=value.

__lt__(value, /)#

Return self<value.

__le__(value, /)#

Return self<=value.

__gt__(value, /)#

Return self>value.

__ge__(value, /)#

Return self>=value.