From 5a5303e6729bc98dfe6817d77a8d8fd37d3e47fc Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Mon, 15 Mar 2021 22:17:09 +0000 Subject: [PATCH 1/5] Support Infinities v0.1 --- Project.toml | 2 +- src/infarrays.jl | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index a32661f..51b2f44 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/infarrays.jl b/src/infarrays.jl index cc010b3..119c593 100644 --- a/src/infarrays.jl +++ b/src/infarrays.jl @@ -284,6 +284,7 @@ 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(s::Slice, r::InfAxes) = invoke(getindex, Tuple{Slice,AbstractUnitRange{Int}}, s, r) getindex(A::AbstractMatrix, kr::InfAxes, jr::InfAxes) = layout_getindex(A, kr, jr) From f590d2057078b883f0a1da5d954887d1c067f46c Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Mon, 15 Mar 2021 22:19:05 +0000 Subject: [PATCH 2/5] v0.10.6 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 51b2f44..197833c 100644 --- a/Project.toml +++ b/Project.toml @@ -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" From 2082cb0463d847ae49d9c07ac3d02d994daac374 Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Tue, 16 Mar 2021 07:55:26 +0000 Subject: [PATCH 3/5] copy for Diagonal(::InfRanges) --- src/infrange.jl | 3 ++- test/runtests.jl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/infrange.jl b/src/infrange.jl index 8a17613..06ca127 100644 --- a/src/infrange.jl +++ b/src/infrange.jl @@ -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 \ No newline at end of file +permutedims(D::Diagonal{<:Any,<:InfRanges}) = D +copy(D::Diagonal{<:Any,<:InfRanges}) = D \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index db4757d..fb7d3da 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -528,7 +528,7 @@ end @test permutedims(D) ≡ D - + @test copy(D) ≡ D end @testset "concat" begin From 7713d2e67d3ae2980e6e4df908886f51dc09506b Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Tue, 16 Mar 2021 09:58:18 +0000 Subject: [PATCH 4/5] Update runtests.jl --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index fb7d3da..b6a3ef5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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:∞) == ℵ₀ From 526bb83c6a2bb49458247b73ec41388209632022 Mon Sep 17 00:00:00 2001 From: Sheehan Olver Date: Tue, 16 Mar 2021 15:37:32 +0000 Subject: [PATCH 5/5] Update infarrays.jl --- src/infarrays.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infarrays.jl b/src/infarrays.jl index 119c593..857410b 100644 --- a/src/infarrays.jl +++ b/src/infarrays.jl @@ -283,7 +283,7 @@ 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)