Thanks everyone for all the comments! It helped to understand better the
advantages/disadvantages of the various options to interact with C.
Jose.
--- On Sat 05/17, Bill Spotz < [EMAIL PROTECTED] > wrote:
Just to make sure the original question gets answered, yes, numpy.i
avoids copies as
Just to make sure the original question gets answered, yes, numpy.i
avoids copies as much as possible.
A special case is when your C code provides you with a view of its
internal data and does not require any memory to be allocated by the
(python) user. This can be dangerous, but if it is y
On Sat, May 17, 2008 at 8:35 PM, Nathan Bell <[EMAIL PROTECTED]> wrote:
> On Sat, May 17, 2008 at 9:30 PM, Brian Granger <[EMAIL PROTECTED]> wrote:
>>
>> Please correct any new errors I have introduced.
>>
>
> Thanks Brian, I think that's a fair representation.
>
> Minor typo "course grained" -> "c
Jose,
As you can see, people have different preferences for wrapping C/C++
code. I should also mention that one of the easiest methods if numpy
arrays are involved is ctypes. numpy arrays already have more-or-less
built-in support for talking to ctypes. Details are available here:
http://www.s
On Sat, May 17, 2008 at 9:30 PM, Brian Granger <[EMAIL PROTECTED]> wrote:
>
> Please correct any new errors I have introduced.
>
Thanks Brian, I think that's a fair representation.
Minor typo "course grained" -> "coarse-grained"
--
Nathan Bell [EMAIL PROTECTED]
http://graphics.cs.uiuc.edu/~wnbe
>> Cython is a different approach from SWIG (see
>> http://wiki.cython.org/WrappingCorCpp; in particular SWIG uses more layers
>> of indirection).
>>
>
> >From the link:
> "[SWIG] Can wrap almost any C and C++ code, including templates etc.
> Disadvantage is that it produces a C file, this compiles
On Sat, May 17, 2008 at 8:13 PM, Nathan Bell <[EMAIL PROTECTED]> wrote:
> On Sat, May 17, 2008 at 7:48 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
>> For the purposes to which SWIG was applied in that case, the findings
>> are accurate.
>
> IMO it's deliberately misleading. The following three laye
On Sat, May 17, 2008 at 7:48 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> For the purposes to which SWIG was applied in that case, the findings
> are accurate.
IMO it's deliberately misleading. The following three layers are
spurious and have no analog on the Cython stack:
Python code to provi
On Sat, May 17, 2008 at 7:39 PM, Nathan Bell <[EMAIL PROTECTED]> wrote:
> More disingenuous FUD here: http://www.sagemath.org/doc/html/prog/node36.html
For the purposes to which SWIG was applied in that case, the findings
are accurate. The wording is overly general, though; it doesn't talk
about
On Sat, May 17, 2008 at 6:42 PM, Dag Sverre Seljebotn
<[EMAIL PROTECTED]> wrote:
>
> Cython is a different approach from SWIG (see
> http://wiki.cython.org/WrappingCorCpp; in particular SWIG uses more layers
> of indirection).
>
>From the link:
"[SWIG] Can wrap almost any C and C++ code, including
On Sat, May 17, 2008 at 5:55 PM, Jose Martin <[EMAIL PROTECTED]> wrote:
>
> Hi, I'd like to access a C function from python, and the function takes
> input/output arrays. I'd probably use SWIG to do the interface to the C code.
> I found 2 options:
> -NumPtr module, to access Numeric arrays as po
Jose Martin wrote:
>
> Hi, I'd like to access a C function from python, and the function takes
> input/output arrays. I'd probably use SWIG to do the interface to the C
> code. I found 2 options:
> -NumPtr module, to access Numeric arrays as pointers
> http://www.penzilla.net/tutorials/python/numpt
Hi, I'd like to access a C function from python, and the function takes
input/output arrays. I'd probably use SWIG to do the interface to the C code. I
found 2 options:
-NumPtr module, to access Numeric arrays as pointers
http://www.penzilla.net/tutorials/python/numptr/
- numpy.i, a SWIG interfa
13 matches
Mail list logo