tBuLi / symfit

Symbolic Fitting; fitting as it should be.
http://symfit.readthedocs.org
MIT License
235 stars 19 forks source link

Fixed an issue with the dimensionaly of the Dfun argument to odeint #107

Closed tBuLi closed 7 years ago

tBuLi commented 7 years ago

In checking interactive_guess I found that it's example with 2D ODE's didn't work. It's weird that similar examples in the tests did run properly, but the jacobian was indeed a vector and not a matrix as it should be.

This branch fixes this, and I will also use this later to implement numerical_jacobian on ODEModels later.

tBuLi commented 7 years ago

@Pitje06: any ideas as to why this could be? I can't reproduce this problem from my own code, so something happens in interactive_fit which forces this bug to manifest.

pckroon commented 7 years ago

No, I don't know why this happens. I worked around it by changing my example from

{
A: k * A, 
B: -k * A
}

to

{
A: k * A**2, 
B: -k * A**2
}