[Numpy-discussion] how to include numpy headers when building an extension?

Robert Kern robert.kern at gmail.com
Mon Sep 10 20:03:26 EDT 2007


Christopher Barker wrote:
> Hi all,
> 
> I'm porting an extension from Numeric. At the top, I've changed:
> 
> #include <Numeric/arrayobject.h>
> 
> to
> 
> #include <numpy/arrayobject.h>
> 
> But distutils can't find numpy/arrayobject.h -- how do I tell distutils 
> where to look for it? I've gotten it to work by hard-coding the entire 
> path, but that's not very portable.

numpy.get_include()

-- 
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