Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The error is caused by executing r=w.imag() where it happens that w is not of complex type but a floating point number. To make it work in all cases, you may like to add conversion of w into a complex type before extracting its imaginary part:

r=CC(w).imag()