skspatial.objects.Vector.norm

Vector.norm(**kwargs) numpy.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)
3.742
>>> vector.norm(ord=1)
6.0
>>> vector.norm(ord=0)
3.0