Faster `np.linalg.norm(x, axis=-1)` for 3D vectors
(x: np.ndarray)
| 284 | |
| 285 | |
| 286 | def 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 | |
| 291 | def depth_occlusion_edge_numpy(depth: np.ndarray, mask: np.ndarray, thickness: int = 1, tol: float = 0.1): |
nothing calls this directly
no outgoing calls
no test coverage detected