skspatial.objects.Plane.distance_points

Plane.distance_points(point: Union[ndarray, Sequence]) ndarray[source]

Return the distances from multiple points to the plane.

Parameters:
pointsarray_like

Input points.

Returns:
np.ndarray

Distances from the points to the plane.

References

http://mathworld.wolfram.com/Point-PlaneDistance.html

Examples

>>> from skspatial.objects import Plane
>>> plane = Plane([0, 0, 0], [0, 0, 1])
>>> plane.distance_points([[5, 2, 0], [5, 2, 1], [5, 2, -4], [5, 2, -4]])
array([0., 1., 4., 4.])