[Numpy-discussion] Numpy/Cython Google Summer of Code project idea

william ratcliff william.ratcliff at gmail.com
Fri Mar 7 14:41:22 EST 2008


Will Cython be compatible with OpenMP?  I tried with weave some time back
and failed miserably.  Has anyone tried with ctypes?

Cheers,
William

On Fri, Mar 7, 2008 at 12:50 PM, Christopher Barker <Chris.Barker at noaa.gov>
wrote:

> Joris De Ridder wrote:
> > Thanks. I've a few questions concerning the objections against ctypes.
>
> It's not so much an abjection (I think), but the fact that pyrex/Cython
> really are different beasts, with different goals.
>
>  > For ctypes your extensions needs to be
> > compiled as a shared library,
>
> The compiling isn't the key issue -- you're right, that's not too big a
> deal, and Scons helps.
>
> If your goal is primarily to wrap existing C code, then ctypes is a good
> option. But if you are trying to write new code as extension modules,
> then Cython helps with that a lot. You do need to "get" C, but you don't
> actually have to write functional stand-alone C code.
>
> > neither pyrex nor ctypes seem to be particularly user-
> > friendly concerning Numpy ndarrays
>
> True, though it looks like one of the goals of Cython is to make it more
> user-friendly to numpy arrays -- I'm really looking forward to that.
>
> I suppose an example might be in order here - does anyone have a small,
> but not trivial, example of an extension that could be done with both
> Ctypes and Cython that we could examine?
>
> By the way, I know Greg Ewing was asked about better support for numpy
> arrays in Pyrex, and he said "I'm *definitely* not going to
> re-implement C++ templates!" -- is there talk of creating a way to write
> extensions that could operate on numpy arrays of arbitrary type with
> Cython?
>
> -Chris
>
>
> --
> Christopher Barker, Ph.D.
> Oceanographer
>
> Emergency Response Division
> NOAA/NOS/OR&R            (206) 526-6959   voice
> 7600 Sand Point Way NE   (206) 526-6329   fax
> Seattle, WA  98115       (206) 526-6317   main reception
>
> Chris.Barker at noaa.gov
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080307/95e9ac0a/attachment.html>


More information about the NumPy-Discussion mailing list