On Thu, Jan 1, 2009 at 17:25, Igor Sylvester wrote:
> Robert,
>
> If I import numpy and then import a 3rd party extension module, why does the
> extension module still have to call import_array if numpy sets this array in
> the first place? I assume that there's a single array of API functions in
Robert,
If I import numpy and then import a 3rd party extension module, why does the
extension module still have to call import_array if numpy sets this array in
the first place? I assume that there's a single array of API functions in a
single python process with multiple extension modules.
Igo
On Thu, Jan 1, 2009 at 14:21, Igor Sylvester wrote:
> I realize I need to call import_array() in the module initialization
> module. Why isn't this equivalent to importing numpy before importing my
> module?
In 3rd party extension modules, all of the PyArray_* API functions are
actually #define
I realize I need to call import_array() in the module initialization
module. Why isn't this equivalent to importing numpy before importing my
module?
-- Forwarded message --
From: Igor Sylvester
Date: Thu, Jan 1, 2009 at 1:09 PM
Subject: PyArray_DescrConverter segfault
To: Numpy-
Hi,
Does anyone have an insight on the following problem?
PyObject* descr(PyObject* self, PyObject* args) {
PyObject *d;
PyArg_ParseTuple(args, "O&", PyArray_DescrConverter, &d);
return d;
}
>>> import numpy
>>> import mymodule
>>> numpy.__version__
'1.2.1'
>>> mymodule.descr([('a', 'i4'),