Skip to content

Commit 2ca9716

Browse files
committed
Allow StepRange
1 parent 00e3a5f commit 2ca9716

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "HarmonicOrthogonalPolynomials"
22
uuid = "e416a80e-9640-42f3-8df8-80a93ca01ea5"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.6"
4+
version = "0.6.1"
55

66
[deps]
77
BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"

src/multivariateops.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, J::Block{1
3535
getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, JR::BlockRange{1}) where D = P[xy, Block.(OneTo(Int(maximum(JR))))][JR]
3636
getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, Jj::BlockIndex{1}) where D = P[xy, block(Jj)][blockindex(Jj)]
3737
getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, j::Integer) where D = P[xy, findblockindex(axes(P,2), j)]
38-
getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, jr::AbstractVector{<:Integer}) where D = P[xy, Block.(OneTo(Int(findblock(axes(P,2), maximum(jr)))))][jr]
38+
getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, jr::AbstractVector{<:Integer}) where D = P[xy, Block.(OneTo(Integer(findblock(axes(P,2), maximum(jr)))))][jr]
3939

4040
const FirstInclusion = BroadcastQuasiVector{<:Any, typeof(first), <:Tuple{Inclusion}}
4141
const LastInclusion = BroadcastQuasiVector{<:Any, typeof(last), <:Tuple{Inclusion}}

test/runtests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,3 +428,10 @@ end
428428
@test isdiag(A[1:N, 1:N])
429429
@test A[1:N, 1:N]^2 A2[1:N, 1:N]
430430
end
431+
432+
@testset "Issue #88" begin
433+
S = SphericalHarmonic()
434+
v = S[SphericalCoordinate(0.1,0.2), 1:2:end]
435+
@test length(v) ==
436+
@test v[1:5] == S[SphericalCoordinate(0.1,0.2), 1:2:10]
437+
end

0 commit comments

Comments
 (0)