pytensor
pytensor copied to clipboard
Adding rewrites involving kronecker product
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
- [ ] Checked that the pre-commit linting/style checks pass
- [ ] Included tests that prove the fix is effective or that the new feature works
- [ ] Added necessary documentation (docstrings and/or example notebooks)
- [ ] If you are a pro: each commit corresponds to a relevant logical change
Type of change
- [ ] New feature / enhancement
- [ ] Bug fix
- [ ] Documentation
- [ ] Maintenance
- [ ] Other (please specify):
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
@@ 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: |