-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix indexing with StepRanges at infinity #89
base: master
Are you sure you want to change the base?
Conversation
No idea what the deal is with the segfaults on macOS (not reproducible on Windows) but it's hanging on ubuntu because (HarmonicOrthogonalPolynomials) julia> JR = Block.(OneTo(Integer(+∞)))
BlockRange(Base.OneTo(ℵ₀))
(HarmonicOrthogonalPolynomials) julia> maximum(JR) # hangs
WARNING: Force throwing a SIGINT
ERROR: InterruptException:
Stacktrace:
[1] _foldl_impl(op::Base.BottomRF{typeof(max)}, init::Base._InitialValue, itr::BlockArrays.BlockRange{1, Tuple{…}})
@ Base .\reduce.jl:63
[2] foldl_impl(op::Base.BottomRF{typeof(max)}, nt::Base._InitialValue, itr::BlockArrays.BlockRange{1, Tuple{Base.OneTo{…}}})
@ Base .\reduce.jl:48
[3] mapfoldl_impl(f::typeof(identity), op::typeof(max), nt::Base._InitialValue, itr::BlockArrays.BlockRange{1, Tuple{…}})
@ Base .\reduce.jl:44
[4] mapfoldl(f::Function, op::Function, itr::BlockArrays.BlockRange{1, Tuple{Base.OneTo{…}}}; init::Base._InitialValue)
@ Base .\reduce.jl:175
[5] _mapreduce(f::Function, op::Function, ::IndexCartesian, A::BlockArrays.BlockRange{1, Tuple{Base.OneTo{…}}})
@ Base .\reduce.jl:450
[6] _mapreduce_dim(f::Function, op::Function, ::Base._InitialValue, A::BlockArrays.BlockRange{1, Tuple{…}}, ::Colon)
@ Base .\reducedim.jl:337
[7] mapreduce(f::Function, op::Function, A::BlockArrays.BlockRange{1, Tuple{…}}; dims::Function, init::Base._InitialValue)
@ Base .\reducedim.jl:329
[8] _maximum(f::Function, a::BlockArrays.BlockRange{1, Tuple{Base.OneTo{…}}}, ::Colon; kw::@Kwargs{})
@ Base .\reducedim.jl:987
[9] _maximum(a::BlockArrays.BlockRange{1, Tuple{Base.OneTo{Infinities.InfiniteCardinal{0}}}}, ::Colon; kw::@Kwargs{})
@ Base .\reducedim.jl:986
[10] maximum(a::BlockArrays.BlockRange{1, Tuple{Base.OneTo{Infinities.InfiniteCardinal{0}}}})
@ Base .\reducedim.jl:982
[11] top-level scope
@ REPL[36]:1
Some type information was truncated. Use `show(err)` to see complete types. since the call chain is getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, jr::AbstractVector{<:Integer}) where D = P[xy, Block.(OneTo(Integer(findblock(axes(P,2), maximum(jr)))))][jr]
getindex(P::MultivariateOrthogonalPolynomial{D}, xy::StaticVector{D}, JR::BlockRange{1}) where D = P[xy, Block.(OneTo(Int(maximum(JR))))][JR] I would think that |
MacOS failure is a known issue with FastTransforms.jl (@MikaelSlevinsky any updates on this?) I think just remove the MacOS tests for now. |
As of InfiniteArrays v0.15 it would go in InfiniteArraysBlockArraysExt.jl |
Not really sure the best way to fix the stackoverflow here. Might just have to come back to this at some point |
Needs JuliaLinearAlgebra/InfiniteLinearAlgebra.jl#190 to be merged before the tests will pass here.
Fixes #88.