rpep / cython-fftw

A very simple Cython project which demonstrates how to call FFTW natively

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrapping FFTW methods with Cython

This repository just shows how simple it is to wrap up C functions with Cython so that they can be used in Python.

All of the interesting code here is written in C. The point of this is not to show how we can do complex wrapping with Cython; it's to show that if you already have everything set up in C functions, the Cython code can be very straightforward and not have complex type definitions. This is my preferred method of using Cython, as it gives the best performance.

To build this:

virtualenv env
source env/bin/activate
pip install -r requirements.txt
make

To test:

make test

About

A very simple Cython project which demonstrates how to call FFTW natively

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C 46.8%Language:Python 42.0%Language:Makefile 11.2%