[Numpy-discussion] calling _import_array() twice crashes python

Soeren Sonnenburg python-ml@nn7...
Wed Mar 4 08:01:39 CST 2009


Dear all,

I've written a wrapper enabling to run python code from within octave
(and vice versa). To this end I am embedding python in octave. So I am
calling

Py_Initialize();
_import_array();
<do something with numpy>
Py_Finalize();

multiple times. While things work nicely on the first run, I am getting
a crash on _import_array() on the second run...

Is there any cleanup function I should potentially call that would
prevent this?

Soeren



More information about the Numpy-discussion mailing list