Jan-15-2019, 10:16 AM
Thanks! This seems to work with numpy now. In my case, it looks like masking [exZeroDivide, exPrecision] is fixing the problem.
It is probably safer to mask/unmask the exceptions only when calling the Python execution, e.g.
FPUExceptionMask := GetExceptionMask;
SetExceptionMask([exZeroDivide, exPrecision]);
GetPythonEngine.ExecString('python_commands_in_this_string');
SetExceptionMask(FPUExceptionMask);
It is probably safer to mask/unmask the exceptions only when calling the Python execution, e.g.
FPUExceptionMask := GetExceptionMask;
SetExceptionMask([exZeroDivide, exPrecision]);
GetPythonEngine.ExecString('python_commands_in_this_string');
SetExceptionMask(FPUExceptionMask);