support +/- AbstractFill from FillArrays#118
support +/- AbstractFill from FillArrays#118putianyi889 wants to merge 8 commits intoJuliaArrays:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #118 +/- ##
==========================================
+ Coverage 86.14% 86.18% +0.03%
==========================================
Files 6 6
Lines 758 760 +2
==========================================
+ Hits 653 655 +2
Misses 105 105 ☔ View full report in Codecov by Sentry. |
This reverts commit 34ce62b.
| convert(AbstractMatrix{Float64}, transpose(1:∞)) ≡ convert(AbstractMatrix{Float64}, transpose(oneto(∞))) ≡ | ||
| AbstractMatrix{Float64}(transpose(1:∞)) ≡ AbstractMatrix{Float64}(transpose(oneto(∞))) ≡ | ||
| AbstractArray{Float64}(transpose(1:∞)) ≡ AbstractArray{Float64}(transpose(oneto(∞))) ≡ | ||
| transpose(InfUnitRange(1.0)) |
There was a problem hiding this comment.
Why doesn't this work anymore?
There was a problem hiding this comment.
I replaced InfUnitRange(1.0) with 1.0:∞ which is InfStepRange
There was a problem hiding this comment.
julia> typeof(float(1:5))
StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}There was a problem hiding this comment.
Ah should InfUnitRange be restricted to integers?
There was a problem hiding this comment.
It's a subtype of OrdinalRange which by definition only accepts integers.
StepRange throws error for float input while UnitRange doesn't... I'm not sure
There was a problem hiding this comment.
It's a subtype of OrdinalRange which by definition only accepts integers.
I don't think there's a strict requirement on element types, only that the step should be an integer. Floating point UnitRanges are currently allowed
There was a problem hiding this comment.
Floating point
UnitRanges are currently allowed
They are, but the only way to construct them is the default constructor. The tests convert eltypes, which always result in StepRangeLen in Julia Base.
works after Generalise Zeros +/- FillArrays.jl#219
Converting InfUnitRange to float type now gives InfStepRange. InfStepRange is not an ordinal range #109