Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

putianyi889
Copy link
Contributor

@putianyi889 putianyi889 commented Mar 16, 2023

@codecov
Copy link

codecov bot commented Mar 16, 2023

Codecov Report

Merging #118 (e0ad2e8) into master (9360eb6) will increase coverage by 0.03%.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   85.92%   85.96%   +0.03%     
==========================================
  Files           6        6              
  Lines         732      734       +2     
==========================================
+ Hits          629      631       +2     
  Misses        103      103              
Files Coverage Δ
ext/InfiniteArraysDSPExt.jl 91.42% <ø> (ø)
src/InfiniteArrays.jl 86.66% <ø> (ø)
src/infrange.jl 87.65% <100.00%> (+0.07%) ⬆️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!


@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))
Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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}

Copy link
Member

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?

Copy link
Contributor Author

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

Copy link
Member

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 UnitRanges are currently allowed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants