Skip to content

Commit

Permalink
Support Infinities v0.1 (#71)
Browse files Browse the repository at this point in the history
* Support Infinities v0.1

* v0.10.6

* copy for Diagonal(::InfRanges)

* Update runtests.jl

* Update infarrays.jl
  • Loading branch information
dlfivefifty authored Mar 16, 2021
1 parent 9feba0f commit bf93b9f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "InfiniteArrays"
uuid = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
version = "0.10.5"
version = "0.10.6"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand All @@ -15,7 +15,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
ArrayLayouts = "0.6"
DSP = "0.6"
FillArrays = "0.11"
Infinities = "0.0.2"
Infinities = "0.0.2, 0.1"
LazyArrays = "0.21.1"
julia = "1.5"

Expand Down
3 changes: 2 additions & 1 deletion src/infarrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ sub_materialize(::PaddedLayout, v::AbstractVector{T}, ::Tuple{InfAxes}) where T

getindex(A::AbstractVector, r::InfAxes) = layout_getindex(A, r)
getindex(A::LayoutVector, r::InfAxes) = layout_getindex(A, r)
getindex(A::CachedVector, r::InfAxes) = layout_getindex(A, r)
getindex(A::AbstractCachedVector, r::InfAxes) = layout_getindex(A, r)
getindex(s::Slice, r::InfAxes) = invoke(getindex, Tuple{Slice,AbstractUnitRange{Int}}, s, r)


getindex(A::AbstractMatrix, kr::InfAxes, jr::InfAxes) = layout_getindex(A, kr, jr)
Expand Down
3 changes: 2 additions & 1 deletion src/infrange.jl
Original file line number Diff line number Diff line change
Expand Up @@ -612,4 +612,5 @@ end
FillArrays._range_convert(::Type{AbstractVector{T}}, r::InfRanges) where T = convert(AbstractVector{T}, r)


permutedims(D::Diagonal{<:Any,<:InfRanges}) = D
permutedims(D::Diagonal{<:Any,<:InfRanges}) = D
copy(D::Diagonal{<:Any,<:InfRanges}) = D
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ end
@test_throws BoundsError (1:∞)[8:-1:-2]

@test (1:∞)[Base.Slice(1:∞)] 1:
@test Base.Slice(1:∞)[2:∞] 2:
end
@testset "length" begin
@test length(.1:.1:∞) == ℵ₀
Expand Down Expand Up @@ -528,7 +529,7 @@ end


@test permutedims(D) D

@test copy(D) D
end

@testset "concat" begin
Expand Down

2 comments on commit bf93b9f

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/32118

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.10.6 -m "<description of version>" bf93b9f7777e2257ff5953ad6afb31a51d5f6b34
git push origin v0.10.6

Please sign in to comment.