Commit 2bb429e
Fix symbolic to numeric conversion in get_parameter_values (#559)
When creating an ODEProblem from a Basis, get_parameter_values was
returning symbolic values (SymbolicUtils.BasicSymbolic{Real}) instead
of numeric values (Float64), causing the ODE solver to fail with a
MethodError when trying to convert symbolic values to Float64.
The issue occurred because:
1. Symbolics.getdefaultval() can return Num types
2. zero(Symbolics.symtype(p)) returns a symbolic zero, not numeric zero
This fix ensures both get_parameter_values and get_parameter_map
convert all parameter values to Float64 before returning them.
Fixes #559
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 6caca6b commit 2bb429e
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
536 | | - | |
| 535 | + | |
| 536 | + | |
537 | 537 | | |
538 | | - | |
| 538 | + | |
539 | 539 | | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
540 | 543 | | |
541 | 544 | | |
542 | 545 | | |
| |||
552 | 555 | | |
553 | 556 | | |
554 | 557 | | |
555 | | - | |
556 | | - | |
| 558 | + | |
| 559 | + | |
557 | 560 | | |
558 | | - | |
| 561 | + | |
559 | 562 | | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
560 | 567 | | |
561 | 568 | | |
562 | 569 | | |
| |||
0 commit comments