"""Return the matrix inverse of a 3d tensor where first dimension is batch dimension. Each batch dimension returns U_inv_n of input U_n, i.e., U_n U_inv_n = I_n. The algorithm is the column sweep's ...