[Numpy-discussion] embedded PyArray_FromDimsAndDataSegmentationFault

Robert Kern robert.kern@gmail....
Tue May 20 14:23:24 CDT 2008


On Tue, May 20, 2008 at 2:01 PM, Thomas Hrabe <thrabe@burnham.org> wrote:
> After all, I figured how to create an numpy in C with the help below.
>
> If called in C, import_array() but actually _import_array() successfully
> creates all the instances needed for the array.
> However, once I call this function from another environment such as Matlab,
>   PyObject *numpy = PyImport_ImportModule("numpy.core.multiarray");
> in __import_array() returns NULL, because numpy.core.multiarray is not
> found?

Something like that. Call PyErr_Print() do display the full traceback
so you can find out what the actual problem is.

> Do you think it might depend on the path settings?

You've called Py_Initialize() before you do anything else with Py*
functions, right?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco


More information about the Numpy-discussion mailing list