Closed arashgmn closed 2 years ago
This is not a bug. You are supposed to provide initial conditions of the same type as your state space. (e.g. scalar / vector / vector space over complex field / whatever)
To make the software easier to use, I'll add a special case to assume float64 if you provide integers.
Indeed, what I mean by a bug is inconsistent behavior of type interpretation. i.e., if the first initial condition (IC) is float, all the rest, too, will be considered as float even if they are not explicitly declared as such (case 3 above). Whereas if the first IC is int, then even an explicitly float-declared second IC will be interpreted as int (case 2).
Overall, instead of a particular treatment for integer-typed IC, I suggest converting all the ICs to float by default to avoid weird type interpretation by python. In most SDEs, int is a bit unnatural anyway.
PS: I also changed the linewidth
of the snippet above to avoid full line overlaps.
There's a bug that I suppose stems from the type interpretation of initial conditions. The following code which simulates a simple damped harmonic oscillator (with no noise at all) illustrates the error:
Might be related to #15 and #16.