On Sun, Apr 7, 2013 at 6:26 AM, Valentin Haenel <valen...@haenel.co> wrote: > I am currently working with a C extension that wraps a C library. > > The library contains a function that takes, amongst others, a 'void *' > as an argument. Now, I would like for that function to be able to read > the 'data' buffer of a numpy array and thus need to pass address from > Python down into the C-extension.
I can't help but put in a plug for Cython for this kind of thing: www.cython.org Cython comes woth build-in support for numpy arrays, so they have figured all this out for you. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion