[Numpy-discussion] Best numpy code to learn from?

Stephen Simmons mail at stevesimmons.com
Tue Jul 25 15:51:04 CDT 2006


I've written some numpy functions for grouping, translating and
subtotalling data. At the moment they exist as pure Python code, but I
have started rewriting them in C for speed.

As this is my first attempt at a C extension for numpy, I'd appreciate
any suggestions for good numpy coding style to make this work for
strided arrays, multiple data types, etc. My first go at a C version is
very low level (following bincount()'s code in _compiled_base.c as a
guide) and works for integer and character arrays.

Are there other (possible more recent) numpy source files that I should
use as a guide to writing fast, clean, flexible code?



More information about the Numpy-discussion mailing list