MCPcopy Create free account
hub / github.com/Improbable-AI/VisionProTeleop / matrix_from_array

Function matrix_from_array

utils/visualize_tracking.py:91–93  ·  view source on GitHub ↗

Convert a 16-element column-major array to a 4x4 matrix.

(arr: list[float])

Source from the content-addressed store, hash-verified

89
90
91def matrix_from_array(arr: list[float]) -> np.ndarray:
92 """Convert a 16-element column-major array to a 4x4 matrix."""
93 return np.array(arr, dtype=np.float32).reshape(4, 4, order='F')
94
95
96def get_position(matrix: np.ndarray) -> np.ndarray:

Callers 6

extract_hand_positionsFunction · 0.70
draw_camera_frameFunction · 0.70
print_calibration_infoFunction · 0.70
print_extrinsic_infoFunction · 0.70
update_frameMethod · 0.70
_set_axis_limitsMethod · 0.70

Calls 1

reshapeMethod · 0.45

Tested by

no test coverage detected