MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / normalized

Function normalized

embodiedscan/visualization/line_mesh.py:35–39  ·  view source on GitHub ↗

Normalizes a numpy array of points.

(a, axis=-1, order=2)

Source from the content-addressed store, hash-verified

33
34
35def normalized(a, axis=-1, order=2):
36 """Normalizes a numpy array of points."""
37 l2 = np.atleast_1d(np.linalg.norm(a, order, axis))
38 l2[l2 == 0] = 1
39 return a / np.expand_dims(l2, axis), l2
40
41
42class LineMesh(object):

Callers 1

create_line_meshMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected