no, becouse is:
Code
...
Sum = 0.0
....


this working (return 100):
Code
pyX("Sum=0");
pyX("for X in PyVec: Sum += X");


this code also work:
Code
  pyX("def PySum(V):\n\tSum=0\n\tfor X in V:\n\t\tSum =Sum+ X\n\treturn( Sum)\n\n");
  pyX("Sum=PySum(PyVec)");
  printf("\nSum: %f",pyVar("Sum"));


so, is a better use \t not space,

Last edited by Grat; 06/30/19 15:44.