On Thu, Jun 4, 2009 at 7:34 PM, Jon Olav Vik <[email protected]> wrote:
> Jon Olav Vik <jono...@...> writes:
>
> I did try "cdef N_Vector arr2nv(np.ndarray[np.int_t] x):", based on
> http://wiki.cython.org/tutorials/numpy#Efficientindexing
> but I couldn't "cimport numpy as np" as required to get at np.int_t. Any ideas
> why I'd get "error: numpy/arrayobject.h: No such file or directory"? [2]
>

Because the C compiler requires the include path to numpy headers. The
function numpy.get_include() returns it, however I do not remember if
pyximport has the fixes to let you pass such include path. Could you
try to do in your shell

$ export CFLAGS=-I`python -c 'import numpy; print numpy.get_include()'`

and next try to run your code?


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to