Ensure det for 0x0 matrices always returns 1 (and not 0)#2288
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2288 +/- ##
==========================================
+ Coverage 88.22% 88.68% +0.45%
==========================================
Files 126 126
Lines 32000 33859 +1859
==========================================
+ Hits 28233 30027 +1794
- Misses 3767 3832 +65 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Later as in "I will add it to this PR later" or as in later later? |
c6c05cd to
62b660b
Compare
|
My plan was "Later as in 'this PR'". But it is actually difficult to add a "natural" test because all the The only thing I could think of was to add some direct tests for these. In the end I did it by adding them conformance test suite. That is perhaps not the ideal way, athe new tests are focused more on testing The only risk I can think of is that this might break for some rings using the conformance tests. But that's something we can deal with. |
| function det_fflu(M::MatElem{T}) where {T <: RingElement} | ||
| n = nrows(M) | ||
| if n == 0 | ||
| return base_ring(M)() |
There was a problem hiding this comment.
For reference: this was bad as it returned zero.
| error("Generic interpolation requires a domain type") | ||
| R = base_ring(M) | ||
| if n == 0 | ||
| return R() |
There was a problem hiding this comment.
... and this also returned zero
lgoettgens
left a comment
There was a problem hiding this comment.
Lgtm, but please wait until we have working downstream tests again
|
It looks like some |
det for 0x0 matrices always returns 1 (and not 0)
|
CI passes now. Shall we merge, @lgoettgens ? |
Should get some tests... later