[Numpy-discussion] Compile extension modules with Visual Studio 2005

Gael Varoquaux gael.varoquaux at normalesup.org
Wed Jul 25 10:50:03 EDT 2007

On Wed, Jul 25, 2007 at 04:44:08PM +0200, Stefan van der Walt wrote:
> On Wed, Jul 25, 2007 at 03:41:37PM +0200, Gael Varoquaux wrote:
> > On Wed, Jul 25, 2007 at 06:38:55AM -0700, Ray Schumacher wrote:
> > > The codeGenerator is magic, if you ask me:
> > > http://starship.python.net/crew/theller/ctypes/old/codegen.html

> > Can it wrap code passing around arrays ? If so it really does magic that
> > I don't understand.

> If your array is contiguous, it really is only a matter of passing
> along a pointer and dimensions.

> By writing your C-functions in the form

> void func(double* data, int rows, int cols, double* out) { }

> wrapping becomes trivial.

Yes, I have done this many times. It is trivial and very convenient. I
was just wondering if the code generator could detect this pattern.


More information about the NumPy-Discussion mailing list