Disallow empty arrays in maximum/minimum#391
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #391 +/- ##
=======================================
Coverage 99.91% 99.91%
=======================================
Files 8 8
Lines 1147 1149 +2
=======================================
+ Hits 1146 1148 +2
Misses 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I don't actually think this is the right choice: an empty |
|
I think it's important to respect the generic function's contract here, which would allow substituting a materialized array with a julia> f = Fill(4, 0)
0-element Fill{Int64}, with entry equal to 4
julia> sum(f)
0
julia> f' * f
0It's best for such reductions to be consistent. |
|
We already violate the default in many other places, eg Note that the places downstream that depend on this behaviour could possibly be fixed now that support is added for |
This mirrors the behavior of
Arrays:Currently:
After this PR