Description
rewrite_det_blockdiag exists for det but there is no equivalent for slogdet.
since det(block_diag(A, B, ..)) = prod(det(A), det(B), ...), slogdet can
also be computed from the individual sub matrices instead of decomposing
the full block diagonal matrix.
Similar to how rewrite_det_blockdiag is implemented in
https://github.com/pymc-devs/pytensor/blob/main/pytensor/tensor/rewriting/linalg.py#L864
Description
rewrite_det_blockdiag exists for det but there is no equivalent for slogdet.
since det(block_diag(A, B, ..)) = prod(det(A), det(B), ...), slogdet can
also be computed from the individual sub matrices instead of decomposing
the full block diagonal matrix.
Similar to how rewrite_det_blockdiag is implemented in
https://github.com/pymc-devs/pytensor/blob/main/pytensor/tensor/rewriting/linalg.py#L864