pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Adding rewrites involving kronecker product

Open tanish1729 opened this issue 1 year ago • 1 comments

Description

Adds the following rewrites :

  • diag(kron(a,b)) -> outer(diag(a), diag(b))
  • slogdet(kron(a,b)) -> prod(sign(a), sign(b)), sum(logdet(a), logdet(b))

Related Issue

  • [ ] Related to #573

Checklist

Type of change

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

tanish1729 avatar Aug 17 '24 07:08 tanish1729

Codecov Report

Attention: Patch coverage is 69.23077% with 8 lines in your changes missing coverage. Please review.

Project coverage is 81.75%. Comparing base (3eea7d0) to head (329353d). Report is 96 commits behind head on main.

Files with missing lines Patch % Lines
pytensor/tensor/rewriting/linalg.py 69.23% 7 Missing and 1 partial :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #975      +/-   ##
==========================================
- Coverage   81.75%   81.75%   -0.01%     
==========================================
  Files         183      183              
  Lines       47753    47763      +10     
  Branches    11617    11619       +2     
==========================================
+ Hits        39042    39050       +8     
- Misses       6520     6523       +3     
+ Partials     2191     2190       -1     
Files with missing lines Coverage Δ
pytensor/tensor/rewriting/linalg.py 90.63% <69.23%> (-1.85%) :arrow_down:

... and 1 file with indirect coverage changes

codecov[bot] avatar Aug 17 '24 07:08 codecov[bot]