MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / norm3d

Function norm3d

eval_code/recons/models/moge/utils/geometry_numpy.py:286–288  ·  view source on GitHub ↗

Faster `np.linalg.norm(x, axis=-1)` for 3D vectors

(x: np.ndarray)

Source from the content-addressed store, hash-verified

284
285
286def norm3d(x: np.ndarray) -> np.ndarray:
287 "Faster `np.linalg.norm(x, axis=-1)` for 3D vectors"
288 return np.sqrt(np.square(x[..., 0]) + np.square(x[..., 1]) + np.square(x[..., 2]))
289
290
291def depth_occlusion_edge_numpy(depth: np.ndarray, mask: np.ndarray, thickness: int = 1, tol: float = 0.1):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected