-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support +/- AbstractFill from FillArrays #118
base: master
Are you sure you want to change the base?
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.
|
||
@test convert(AbstractArray{Float64}, transpose(1:∞)) ≡ convert(AbstractArray{Float64}, transpose(oneto(∞))) ≡ | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why doesn't this work anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I replaced InfUnitRange(1.0)
with 1.0:∞
which is InfStepRange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
julia> typeof(float(1:5))
StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah should InfUnitRange be restricted to integers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 UnitRange
s are currently allowed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Floating point
UnitRange
s 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