Closed timweiland closed 1 year ago
Merging #817 (636c850) into main (2b93645) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #817 +/- ##
=======================================
Coverage 91.14% 91.15%
=======================================
Files 218 218
Lines 8210 8216 +6
Branches 1061 1061
=======================================
+ Hits 7483 7489 +6
Misses 499 499
Partials 228 228
Impacted Files | Coverage Δ | |
---|---|---|
src/probnum/linops/_arithmetic.py | 94.20% <100.00%> (+0.17%) |
:arrow_up: |
In a Nutshell
Previously, multiplying the Zero linear operator by a scalar would return a ScaledLinearOperator. But we can just directly return the original Zero linear operator.
Why?
This simplifies composed linear operators a little bit, particularly because the Zero linear operator can now be absorbed further, e.g. in a sum. Consider the following snippet:
With this change, the result is