Convert a 16-element column-major array to a 4x4 matrix.
(arr: list[float])
| 168 | # ============================================================================ |
| 169 | |
| 170 | def matrix_from_array(arr: list[float]) -> np.ndarray: |
| 171 | """Convert a 16-element column-major array to a 4x4 matrix.""" |
| 172 | return np.array(arr, dtype=np.float64).reshape(4, 4, order='F') |
| 173 | |
| 174 | |
| 175 | def get_position(matrix: np.ndarray) -> np.ndarray: |
no test coverage detected