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: diff --git a/src/multivariateops.jl b/src/multivariateops.jl index 74f3681..67f35ec 100644 --- a/src/multivariateops.jl +++ b/src/multivariateops.jl @@ -32,10 +32,10 @@ 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(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