MCPcopy Create free account
hub / github.com/densechen/CASS / unit_vector

Function unit_vector

lib/transformations.py:1727–1768  ·  view source on GitHub ↗

Return ndarray normalized by length, i.e. Euclidean norm, along axis. >>> v0 = numpy.random.random(3) >>> v1 = unit_vector(v0) >>> numpy.allclose(v1, v0 / numpy.linalg.norm(v0)) True >>> v0 = numpy.random.rand(5, 4, 3) >>> v1 = unit_vector(v0, axis=-1) >>> v2 = v0 / nump

(data, axis=None, out=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 8

reflection_matrixFunction · 0.85
rotation_matrixFunction · 0.85
scale_matrixFunction · 0.85
projection_matrixFunction · 0.85
shear_matrixFunction · 0.85
quaternion_slerpFunction · 0.85
setaxesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected