Skip to content

Fix empty-input Dict{Any,Any} MethodError in wronskian - #557

Open
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-empty-uvars-dict
Open

ChrisRackauckas-Claude wants to merge 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:fix-empty-uvars-dict

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Summary

  • When an ODE has no inputs, Dict(u => [rand(...)] for u in ode_red.u_vars) infers Dict{Any,Any} (Julia cannot stabilize the generator when the key iterator is empty and the value uses rand).
  • That misses the typed power_series_solution methods and breaks assess_identifiability / find_identifiable_functions for input-free models (including all Catalyst extension tests).
  • Annotate the three dicts with P_red = eltype(ode_red.x_vars).

Test plan

  • assess_identifiability on a Goodwin-like @ODEmodel with no inputs succeeds locally after this change (previously MethodError on power_series_solution(..., Dict{Any,Any}, ...)).
  • SI test suite / Catalyst Extensions Tests go green once released.

Unblocks SciML/Catalyst.jl#1525 Extensions CI.

Made with Cursor

When an ODE has no inputs, `Dict(u => rand(...) for u in u_vars)` infers
`Dict{Any,Any}` and misses the typed `power_series_solution` methods.
Annotate the three value dicts with the reduced ring's polynomial type.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

This branch has not been deployed

No deployments
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.

2 participants