kwgoodman/bottleneck — pull request #86 by shoyer (2014-05-21 08:03:13+00:00)
Title: WIP: fast functions for N-dimensions

This is an initial demonstration of one of my proposals in #84.

To generate Cython code for some different number of dimensions, run, for example:

make pyx NDIM_MAX=4

So far, only move_max has been switched to use the N-dimensional code generation. The generated Cython code for move_max.pyx with NDIM_MAX=3 is entirely identical to the current version of bottleneck, except for the removal or insertion of 12 blank files. I have not yet tested any of the generated code.

I believe templates written in this model should be able to produce N-dimensional Cython for almost all bottleneck functions. The only exception that is immediately apparent is nanstd, which uses two separate loops in the case of `axis=None`.