[Numpy-discussion] Numpy and C++ integration...

Sebastian Haase haase at msg.ucsf.edu
Tue Feb 5 05:48:37 EST 2008


On Feb 5, 2008 9:21 AM, Gael Varoquaux <gael.varoquaux at normalesup.org> wrote:
> On Tue, Feb 05, 2008 at 09:15:29AM +0100, Sebastian Haase wrote:
> > Can ctypes do this ?
>
> No. Ctypes is only a way of loading C (and not C++) libraries in Python.
> That makes it very simple, but not very powerful.
>
> Gaël
(sorry, this email got stuck in moderation, because I used the wrong
sender address)

Thanks fr the reply.
How about "manual" overloading. I mean, if -- for example -- I have
two functions mmms_b and mmms_i in C, I could still use ctypes; could
I then "merge" them into one python function, which "re-routes"
depending on the argument dtype !?
This is what SWIG must be doing internally -- right ?!
Numpy/ctypes  could come with such "re-routing helper meta-function"
(decorators?) out-of-the-box...

Thanks,
-Sebastian



More information about the NumPy-Discussion mailing list