[Biopython-dev] Numeric/numpy - Bio/Affy/CelFile.py

Michiel de Hoon mjldehoon at yahoo.com
Fri Sep 19 11:03:47 EDT 2008


> try:
>     from Numeric import x, y, z
> except ImportError:
>     from numpy.oldnumeric import x, y, z

This is the easy part. Keep in mind though that the "from numpy.oldnumeric import x, y, z" approach is only a temporary solution; at some point, the oldnumeric wrapper will disappear from numpy.

> where I assumed the C code would have been decided at
> compile time.

This is the complicated part; it's not just replacing one #include with another. We'd have to use a bunch of #ifdefs to separate the old code from the new code.

Anyway I was planning to go through the Numerical Python - dependent code to see if any other changes are needed. If anybody wants to be able to use the old Numerical Python, please let yourself be heard; otherwise I suggest we go directly to NumPy.

--Michiel


--- On Fri, 9/19/08, Peter Cock <p.j.a.cock at googlemail.com> wrote:

> From: Peter Cock <p.j.a.cock at googlemail.com>
> Subject: Re: [Biopython-dev] Numeric/numpy - Bio/Affy/CelFile.py
> To: mjldehoon at yahoo.com
> Cc: "BioPython-Dev Mailing List" <biopython-dev at lists.open-bio.org>
> Date: Friday, September 19, 2008, 9:57 AM
> On Fri, Sep 19, 2008 at 2:05 PM, Michiel de Hoon
> <mjldehoon at yahoo.com> wrote:
> > Actually, I was under the impression that the latest
> consensus was to go to NumPy directly. It's quite
> complicated to support both NumPy and Numerical Python, at
> least at the C level.
> 
> I was assuming dual support for both numpy or Numeric for
> the next
> release based on code like this:
> 
> try:
>     from Numeric import x, y, z
> except ImportError:
>     from numpy.oldnumeric import x, y, z
> 
> where I assumed the C code would have been decided at
> compile time.
> 
> If a simple switch from Numeric to numpy is what you and
> Brad had in
> mind, that's OK with me but in the python code we
> should just use
> simple imports from numpy only.
> 
> Peter


      


More information about the Biopython-dev mailing list