pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Added rewrites involving block diagonal matrices

Open tanish1729 opened this issue 1 year ago • 2 comments

Description

Added the following rewrites :

  • diag(block_diag(*sub_matrices)) -> concatenate(diag(sub_matrices))
  • det(block_diag(*sub_matrices)) -> prod(det(sub_matrices))
  • slogdet(block_diag(*sub_matrices)) -> prod(sign(a), sign(b), sign(c),...), sum(logdet(a), logdet(b), logdet(c),....)

Related Issue

  • [ ] Related to #573

Checklist

Type of change

  • [ ] New feature / enhancement
  • [ ] Bug fix
  • [ ] Documentation
  • [ ] Maintenance
  • [ ] Other (please specify):

tanish1729 avatar Aug 10 '24 10:08 tanish1729

You need to rebase.

twiecki avatar Aug 10 '24 20:08 twiecki

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.74%. Comparing base (1a1c62b) to head (fa7d9da). Report is 133 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #967      +/-   ##
==========================================
+ Coverage   81.73%   81.74%   +0.01%     
==========================================
  Files         182      182              
  Lines       47633    47663      +30     
  Branches    11604    11622      +18     
==========================================
+ Hits        38934    38964      +30     
+ Misses       6509     6507       -2     
- Partials     2190     2192       +2     
Files with missing lines Coverage Δ
pytensor/tensor/rewriting/linalg.py 92.48% <100.00%> (+0.81%) :arrow_up:

... and 2 files with indirect coverage changes

codecov[bot] avatar Aug 19 '24 09:08 codecov[bot]