scipy/scipy — pull request #220 by pv (2012-05-19 22:08:48+00:00)
Title: BUG: integrate: fix complex_ode y attribute

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 `y` variable were misleadingly documented. Anyway, I'm thinking that just mentioning this in the release notes is enough for the transition... Thoughts?

---------------

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.