Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
BUG: integrate: fix complex_ode y attribute #220
From ticket http://projects.scipy.org/scipy/ticket/1623
Thanks to borishim for the patch.
IMHO, it's probable that nobody is relying on the old behavior, as the contents of the
scipy.integrate.complex_ode solves a complex valued problem by converting the problem to an equivalent real valued one. However, the member variable y of the class instance is a not a complex array but a float array filled with alternating real and imaginary parts. This behavior is not documented clearly. I changed the name of the member variable self.y to self._y and added a getter using property decorator. This patch should be backward compatible for existing real valued problems and more convenient for complex valued problems.