skspatial.objects.Vector.norm

Vector.norm(**kwargs) float64[source]

Return the norm of the vector.

Parameters:
kwargsdict, optional

Additional keywords passed to numpy.linalg.norm().

Returns:
np.float64

Norm of the vector.

Examples

>>> from skspatial.objects import Vector
>>> vector = Vector([1, 2, 3])
>>> vector.norm().round(3)
np.float64(3.742)
>>> vector.norm(ord=1)
np.float64(6.0)
>>> vector.norm(ord=0)
np.float64(3.0)