Embedding a Numeric array in C

Fernando Pérez fperez528 at yahoo.com
Tue May 21 23:05:35 EDT 2002


Chris Fonnesbeck wrote:

> All
> I am trying to do is run a python function (which contains Numeric
> classes) from within C, and get it to return a number. Shouldnt be
> anything TOO complicated.

Ah, I thought you wanted your C code simply to access the python Numeric 
arrays and work on them in pure C. The examples I gave you show how to do 
that, but from the C code I don't know how to call back into python (never 
needed it).

Still it may be useful: if you only figure out how to access a python function 
whose name/signature you know from inside C, maybe weave can help with the 
rest (as long as you wish your 'main' to be in python, not C).

good luck,

f



More information about the Python-list mailing list