Has anyone had problems with dynamically loading PyExc_IOError when
embedding a cython module?
While calling init below:
*in main.c:
*void init {
Py_Initialize();
initmymodule();
do_somethind();
Py_Finalize();
}
*in module.c:*
cdef public void do_something():
import exceptions
pr
If array fields should be of the form (name,subdtype, shape), how do I
specify field offsets? My datatype is word-aligned.
Thanks.
On Tue, Jan 6, 2009 at 3:41 PM, Robert Kern wrote:
> On Tue, Jan 6, 2009 at 14:07, Igor Sylvester wrote:
> > Everyone,
> >
> > Shouldn'
A simpler example returns 1 as well:
np.dtype( [ (((2,), 'a'), 'i1') ] ).itemsize
On Tue, Jan 6, 2009 at 2:07 PM, Igor Sylvester wrote:
> Everyone,
>
> Shouldn't the itemsize below be 2?
>
> >>> import numpy as np
> >
type array of size 2. Each element is a
(nested) record array of size 2 with one field of type 'i1'. In contiguous
memory, this should look identical to an 'i1' array of size 2.
-Igor Sylvester
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
dules.
Igor.
On Thu, Jan 1, 2009 at 4:11 PM, Robert Kern wrote:
> 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
>
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:
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'),
Hi.
I have mingw and Visual Studio installed on my computer. I am following the
building instructions posted in [1]. I explicitly tell setup.py to use
mingw by passing the argument --compiler=mingw32. However, setuptools is
using Visual Studio anyways. has anyone encountered this problem? I am