matrix_log_33

torch_sim.math.matrix_log_33(matrix, sim_dtype=torch.float64, fallback_warning=False)[source]

Compute the matrix logarithm of a square 3x3 matrix.

Parameters:
  • matrix (Tensor) – A square 3x3 matrix tensor

  • sim_dtype (dtype) – Simulation dtype, default=torch.float64

  • fallback_warning (bool) – Whether to print a warning when falling back to scipy, default=False

Returns:

The matrix logarithm of the input matrix

Return type:

Tensor

This function attempts to use the exact formula for 3x3 matrices first, and falls back to scipy implementation if that fails.