Best numpy code to learn from?

July 25, 2006
1:51 p.m.
Hi, 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? Cheers Stephen

6888
Age (days ago)
6888
Last active (days ago)
1 comments
2 participants
participants (2)
-
David Grant
-
Stephen Simmons