From 2ca9716bba1fe61056103ffdef6fd879ce8b64d9 Mon Sep 17 00:00:00 2001 From: DanielVandH Date: Tue, 19 Nov 2024 10:12:57 +0000 Subject: [PATCH 1/6] Allow StepRange --- Project.toml | 2 +- src/multivariateops.jl | 2 +- test/runtests.jl | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 556c039..9a374ca 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "HarmonicOrthogonalPolynomials" uuid = "e416a80e-9640-42f3-8df8-80a93ca01ea5" authors = ["Sheehan Olver "] -version = "0.6" +version = "0.6.1" [deps] BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" diff --git a/src/multivariateops.jl b/src/multivariateops.jl index 74f3681..83a188a 100644 --- a/src/multivariateops.jl +++ b/src/multivariateops.jl @@ -35,7 +35,7 @@ getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, J::Block{1 getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, JR::BlockRange{1}) where D = P[xy, Block.(OneTo(Int(maximum(JR))))][JR] getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, Jj::BlockIndex{1}) where D = P[xy, block(Jj)][blockindex(Jj)] getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, j::Integer) where D = P[xy, findblockindex(axes(P,2), j)] -getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, jr::AbstractVector{<:Integer}) where D = P[xy, Block.(OneTo(Int(findblock(axes(P,2), maximum(jr)))))][jr] +getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, jr::AbstractVector{<:Integer}) where D = P[xy, Block.(OneTo(Integer(findblock(axes(P,2), maximum(jr)))))][jr] const FirstInclusion = BroadcastQuasiVector{<:Any, typeof(first), <:Tuple{Inclusion}} const LastInclusion = BroadcastQuasiVector{<:Any, typeof(last), <:Tuple{Inclusion}} diff --git a/test/runtests.jl b/test/runtests.jl index 848feb2..c1fd01f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -428,3 +428,10 @@ end @test isdiag(A[1:N, 1:N]) @test A[1:N, 1:N]^2 ≈ A2[1:N, 1:N] end + +@testset "Issue #88" begin + S = SphericalHarmonic() + v = S[SphericalCoordinate(0.1,0.2), 1:2:end] + @test length(v) == ∞ + @test v[1:5] == S[SphericalCoordinate(0.1,0.2), 1:2:10] +end \ No newline at end of file From 55e90db1a0468c7e54f7dbf863b40694f58d5f69 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:25:46 +0000 Subject: [PATCH 2/6] Update ci.yml --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e679f1..fa50bf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,8 @@ jobs: fail-fast: false matrix: version: - - '1.10' + - '1' + - 'lts' os: - ubuntu-latest - macOS-latest From 83727998a055a38feac45e3bf2f6fcc4895fb329 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:28:51 +0000 Subject: [PATCH 3/6] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fa50bf3..4720566 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: - x64 steps: - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} From 523c798237104c65e2db277072f2bb9142d9d715 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:29:04 +0000 Subject: [PATCH 4/6] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4720566..18ecfc1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: arch: - x64 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} From 4ae07753d7543a86016bd9b2eab86dc3ab065da8 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:10:37 +0000 Subject: [PATCH 5/6] Temporarily remove macOS --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19a1725..c58e241 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,6 @@ jobs: - '1' os: - ubuntu-latest - - macOS-latest arch: - x64 steps: From 1b53177ff596fa182635d64fc001f828db73eac0 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:43:23 +0000 Subject: [PATCH 6/6] integer --- src/multivariateops.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multivariateops.jl b/src/multivariateops.jl index 83a188a..67f35ec 100644 --- a/src/multivariateops.jl +++ b/src/multivariateops.jl @@ -32,7 +32,7 @@ copy(P::MultivariateOrthogonalPolynomial) = P getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, JR::BlockOneTo) where D = error("Overload") getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, J::Block{1}) where D = P[xy, Block.(OneTo(Int(J)))][J] -getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, JR::BlockRange{1}) where D = P[xy, Block.(OneTo(Int(maximum(JR))))][JR] +getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, JR::BlockRange{1}) where D = P[xy, Block.(OneTo(Integer(maximum(JR))))][JR] getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, Jj::BlockIndex{1}) where D = P[xy, block(Jj)][blockindex(Jj)] getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, j::Integer) where D = P[xy, findblockindex(axes(P,2), j)] getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, jr::AbstractVector{<:Integer}) where D = P[xy, Block.(OneTo(Integer(findblock(axes(P,2), maximum(jr)))))][jr]