Skip to content

Fix AbstractDiffEqArray getindex deprecation warnings in tests#366

Merged
ChrisRackauckas merged 1 commit intoSciML:masterfrom
ChrisRackauckas-Claude:fix-deprecation-warnings-abstractdiffeqarray-getindex
Feb 8, 2026
Merged

Fix AbstractDiffEqArray getindex deprecation warnings in tests#366
ChrisRackauckas merged 1 commit intoSciML:masterfrom
ChrisRackauckas-Claude:fix-deprecation-warnings-abstractdiffeqarray-getindex

Conversation

@ChrisRackauckas-Claude
Copy link
Contributor

Summary

  • Fix deprecation warnings for Base.getindex(VA::AbstractDiffEqArray{T, N, A}, i::Int) that appear in CI during Interface and Integrators test groups
  • The deprecated integer indexing was triggered by broadcasting inside isapprox () when comparing DiffEqArray objects returned by solution interpolation (e.g., sol(25:100, idxs = 2))
  • Use .u to extract the underlying array from DiffEqArray objects before comparison, avoiding the deprecated getindex path

Changes

test/interface/save_idxs.jl (5 lines): Access .u on DiffEqArray results from sol(range, idxs=...) and dde_int.integrator.sol(ts, idxs=...) before comparisons

test/integrators/iterator.jl (1 line): Access .u on integrator4.sol(ts) before comparison with plain Vector

Test plan

  • save_idxs Tests: 52/52 pass, zero deprecation warnings
  • Iterator Tests: 12/12 pass, zero deprecation warnings
  • Full Interface test group passes
  • Full Integrators test group passes
  • Runic formatting check passes

🤖 Generated with Claude Code

Use `.u` to access underlying arrays from DiffEqArray objects returned
by solution interpolation before comparison with `≈`, instead of
relying on the deprecated `Base.getindex(::AbstractDiffEqArray, ::Int)`
method that gets triggered by broadcasting during `isapprox`.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit 36a67bb into SciML:master Feb 8, 2026
26 checks passed
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.

3 participants