Skip to content
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

more CI #191

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

more CI #191

wants to merge 1 commit into from

Conversation

ArnoStrouwen
Copy link
Member

RAT deprecation message is incorrect here for the manifold tests.

julia> sol[88]
┌ Warning: `Base.getindex(A::AbstractDiffEqArray, i::Int)` is deprecated, use `Base.getindex(A, :, i)` instead.
│   caller = top-level scope at REPL[26]:1
└ @ Core REPL[26]:1
2×2 Matrix{Float64}:
 0.355718  0.355718
 1.36903   1.36903

julia> sol[end]
┌ Warning: Linear indexing of `AbstractVectorOfArray` is deprecated. Change `A[i]` to `A.u[i]`
│   caller = top-level scope at REPL[27]:1
└ @ Core REPL[27]:1
┌ Warning: `Base.getindex(A::AbstractDiffEqArray, i::Int)` is deprecated, use `Base.getindex(A, :, i)` instead.
│   caller = top-level scope at REPL[27]:1
└ @ Core REPL[27]:1
2×2 Matrix{Float64}:
 0.355718  0.355718
 1.36903   1.36903

julia> sol[:,88]
2×2 Matrix{Float64}:
 0.355718  0.355718
 1.36903   1.36903

julia> sol[:,end]
2×2 Matrix{Float64}:
 1.17331   1.17331
 0.789515  0.789515

@ChrisRackauckas
Copy link
Member

That is correct. sol[88] and sol[end] are what are deprecated.

@ArnoStrouwen
Copy link
Member Author

88 is the end. Yet the result is not the same.

@ChrisRackauckas
Copy link
Member

I see what's going on here.

┌ Warning: Base.getindex(A::AbstractDiffEqArray, i::Int) is deprecated, use Base.getindex(A, :, i) instead.
│ caller = top-level scope at REPL[27]:1
└ @ Core REPL[27]:1

That depwarn is just wrong because A.u[end] is not a vector. sol[:,end] should give a boundserror @AayushSabharwal

@AayushSabharwal
Copy link
Member

AayushSabharwal commented Jan 12, 2024

That's a bit of a tricky one. sol[:, end] lowers to sol[:, lastindex(sol, 2)]. Are we sure no one uses lastindex(sol, i)?

How indexing works for VoA is

  • sol[x]: deprecated, falls back to sol.u[:, x]
  • sol[<all colons>] turns sol into an Array
  • sol[x::CartesianIndex] uses the last index in x for sol.u and the rest for sol.u[first(x)]
  • sol[x::AnythingElse...] uses the last index in x for sol.u and the rest for sol.u[first(x)]

However lastindex(VA, d) = last(axes(VA, d)) so it looks like VA[:, end] doesn't really work when the subarrays aren't vectors. We could just update the depwarn to tell people to use as many Colon()s as dims - 1

@ChrisRackauckas
Copy link
Member

This one can probably get updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants