[Numpy-discussion] Numpy bug?

Karl Bellve Karl.Bellve at umassmed.edu
Thu May 10 08:57:24 EDT 2001


Since I didn't get a response, I will post again with a more appropiate
subject heading. If you run the following code, you get an error. It
appears that Numpy doesn't like to be restarted. If you take out the
lines "import_array();" and "PyRun_SimpleString("from Numeric import
*\n");" the code loops fine.



for (int x = 0; x < 100; x++)
{
   Py_Initialize();
   import_array();
   PyRun_SimpleString("from Numeric import *\n");
   TRACE("%d\n",x);
   Py_Finalize();
}


Here is the output:
0
1
Fatal Python error: UNREF invalid object


-- 
Cheers,



Karl Bellve




More information about the NumPy-Discussion mailing list