Skip to content

ENH: Add slogdet rewrite for block diagonal matrices #1921

@Deshan-5

Description

@Deshan-5

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions