skspatial.objects.Line.project_points¶
- Line.project_points(points: Union[ndarray, Sequence]) Points [source]¶
Project multiple points onto the line.
- Parameters:
- pointsarray_like
Input points.
- Returns:
- Points
Projection of the points onto the line.
Examples
>>> from skspatial.objects import Line
>>> line = Line([0, 0], [0, 1]) >>> line.project_points([[0, 5], [1,5], [0, 1], [1, 0], [0, 2], [-15, 5], [ 50, 10]]) Points([[ 0., 5.], [ 0., 5.], [ 0., 1.], [ 0., 0.], [ 0., 2.], [ 0., 5.], [ 0., 10.]])