skspatial.objects.Vector.project_vector

Vector.project_vector(other: Union[numpy.ndarray, Sequence]) skspatial.objects.vector.Vector[source]

Project an other vector onto the vector.

Parameters
otherarray_like

Other vector.

Returns
Vector

Vector projection.

Examples

>>> from skspatial.objects import Vector
>>> Vector([0, 1]).project_vector([2, 1])
Vector([0., 1.])
>>> Vector([0, 100]).project_vector([2, 1])
Vector([0., 1.])
>>> Vector([0, 1]).project_vector([9, 5])
Vector([0., 5.])
>>> Vector([0, 100]).project_vector([9, 5])
Vector([0., 5.])