matrix_log_scipy¶ torch_sim.math.matrix_log_scipy(matrix)[source]¶ Compute the matrix logarithm of a square matrix using scipy.linalg.logm. This function handles tensors on CPU or GPU and preserves gradients. Parameters: matrix (Tensor) – A square matrix tensor Returns: The matrix logarithm of the input matrix Return type: Tensor