[Numpy-discussion] [ANN] Cython 0.15

Robert Bradshaw robertwb@math.washington....
Tue Aug 9 11:25:17 CDT 2011

On Mon, Aug 8, 2011 at 9:46 AM, Christopher Barker
<Chris.Barker@noaa.gov> wrote:
> On 8/8/11 1:21 AM, Sebastian Haase wrote:
>> b) What is the status of supporting multi-type Cython functions -- ala
>> C++ templates ?
> You might want to take a look at what Keith Goodman has done with the
> "Bottleneck" project -- I think he used a generic template tool to
> generate Cython code for a variety of types from a single definition.

Templating and type parameterization is a really tricky issue to get
right, especially when grafting into a "statically typeless" language
like Python.

The consensus that we had over Cython days was, at least for the
medium term, was:

(1) Implement http://wiki.cython.org/enhancements/fusedtypes for the
most common usecases. Mark has nearly finished this as part of his
GSoC project.

(2) Better support for pre-processing Cython with a templating
language, which would provide users with a high level of flexibility
to do anything sophisticated. (Not implemented, but users are already
doing this.)

(3) While would like to support template C++ functions better in C++
mode, for many reasons this is not the model we want to follow for
Cython type parameterization.

- Robert

More information about the NumPy-Discussion mailing list