Re: [Numpy-discussion] passing a C array to embedded Python from C code

2008-10-30 Thread Matthieu Brucher
2008/10/30 Christopher Barker <[EMAIL PROTECTED]>: > Matthieu Brucher wrote: >> If you can >> follow a French tutorial, you can go on >> http://matthieu-brucher.developpez.com/tutoriels/python/swig-numpy/#LV >> to have a skeletton for your issue. > > That looks very useful -- any chance of an Engl

Re: [Numpy-discussion] passing a C array to embedded Python from C code

2008-10-30 Thread Christopher Barker
Matthieu Brucher wrote: > If you can > follow a French tutorial, you can go on > http://matthieu-brucher.developpez.com/tutoriels/python/swig-numpy/#LV > to have a skeletton for your issue. That looks very useful -- any chance of an English translation? My one year of high school French is provi

Re: [Numpy-discussion] passing a C array to embedded Python from C code

2008-10-30 Thread Christopher Barker
A few comments: Chris LeBlanc wrote: > I'm thinking I could create a > NumPy array that uses the same C array (1d, 2d, or 3d) that our > program is using instead of copying the memory. yes, you can do that. > At this point, I'm thinking the python code wouldn't need to return > any objects bec

Re: [Numpy-discussion] passing a C array to embedded Python from C code

2008-10-30 Thread Matthieu Brucher
> Does this approach make sense? Is there a better way to go about it? > Maybe calling a custom module from the Python code that does the C > array to NumPy translation using Cython/pyrex/swig/etc. Would it be > possible to use the same C arrays from here without copying them? Hi, Your case see

[Numpy-discussion] passing a C array to embedded Python from C code

2008-10-29 Thread Chris LeBlanc
Hello, I'm working on seismic processing software called Globe Claritas. The core is written in C and a bit of Fortran. I would like to embed Python in this software, so a user can use Python code to manipulate the seismic data. This would give our users all the power of Python and NumPy and an