[Biopython-dev] PATCH: NumPy support for BioPython

Ed Schofield edschofield at gmail.com
Mon Mar 12 10:49:26 UTC 2007

On 3/11/07, Michiel de Hoon <mdehoon at c2b2.columbia.edu> wrote:
> Ed Schofield wrote:
> > It's a minor issue, but I can see several reasons to use the header file
> > NumPy provides for the purpose, rather than pasting its definitions into
> > our own source files:
> I am not suggesting to paste the definitions in oldnumeric.h into our
> own source files. The point is that we don't need any of the definitions
> in oldnumeric.h. So we don't need to #include them, and we also don't
> need to paste them into Biopython.
> For example, your patch adds these lines (among others) to
> Bio/KDTree/KDTree.i:
>         #if (NDARRAY_VERSION >= 0x00090908)
>         #include "numpy/oldnumeric.h"
>         #endif
> AFAICT, these three lines can simply be removed.

Ah, yes, I understand. And I've now re-read your previous post and now
understand your point there about clustermodule.c too. So I've changed all
(flags & CONTIGUOUS) instances to use PyArray_ISCONTIGUOUS() in my patch and
updated it at


And you're right ... with these changes, including oldnumeric.h is no longer
necessary anywhere.

-- Ed

More information about the Biopython-dev mailing list