LutzGross/esys-escript.github.io

Warning: Casting complex values to real discards the imaginary part

Closed this issue · 1 comments

this message is issued in some cases when Data objects with complex values are created. it is due to an boost::python::extract on a complex numpy object. The value are still processed properly. A similar problem occurs when in the setTaggedValue method.

The problem was in checkForComplex in escriptcore/src/WrappedArray.cpp when accessing the float attribute of a complex numpy value. This has been fixed using the dtype.kind attribute in 8278bb3