Re: [Tutor] Cython vs Python-C API

2011-11-15 Thread Dario Lopez-Kästen
On Tue, Nov 15, 2011 at 10:26 AM, Stefan Behnel wrote: > Dario Lopez-Kästen, 15.11.2011 09:33: > >> On Tue, Nov 15, 2011 at 9:09 AM, Stefan Behnel wrote: >> >> cubic spline interpolation >>> >> > No, I didn't. > > Stefan > > Oops, apologies. My reply was meant for Jaidev (OP), but I got the quo

Re: [Tutor] Cython vs Python-C API

2011-11-15 Thread Stefan Behnel
Dario Lopez-Kästen, 15.11.2011 09:33: On Tue, Nov 15, 2011 at 9:09 AM, Stefan Behnel wrote: cubic spline interpolation No, I didn't. Stefan ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.o

Re: [Tutor] Cython vs Python-C API

2011-11-15 Thread Dario Lopez-Kästen
Hi, just a thought - have you looked at NumPy/SciPy? Perhaps there already is an API in C that does what you need, sufficiently well/fast? http://docs.scipy.org/doc/scipy/reference/tutorial/interpolate.html It is part of the NumPy/SciPy package(s). http://www.scipy.org/ /dario On Tue, Nov 15,

Re: [Tutor] Cython vs Python-C API

2011-11-15 Thread Stefan Behnel
Jaidev Deshpande, 14.11.2011 21:30: I need to perform cubic spline interpolation over a range of points, and I have written the code for the same in C and in Python. The interpolation is part of a bigger project. I want to front end for the project to be Python. Ideally I want Python only to dea

Re: [Tutor] Cython vs Python-C API

2011-11-14 Thread Steven D'Aprano
Jaidev Deshpande wrote: 1. I can either compile the C code into a module using the Python-C/C++ API, through which I can simple 'import' the required function. 2. I can use the Python code and extend it using Cython. Which will give me a better performance? The only way to be sure is to do bo

Re: [Tutor] Cython vs Python-C API

2011-11-14 Thread Jerry Hill
On Mon, Nov 14, 2011 at 3:30 PM, Jaidev Deshpande < deshpande.jai...@gmail.com> wrote: > Hi > > I need to perform cubic spline interpolation over a range of points, and I > have written the code for the same in C and in Python. > > The interpolation is part of a bigger project. I want to front end

[Tutor] Cython vs Python-C API

2011-11-14 Thread Jaidev Deshpande
Hi I need to perform cubic spline interpolation over a range of points, and I have written the code for the same in C and in Python. The interpolation is part of a bigger project. I want to front end for the project to be Python. Ideally I want Python only to deal with data visualization and i/o,