[Biopython-dev] Numeric/numpy

Brad Chapman chapmanb at 50mail.com
Fri Sep 19 22:34:20 UTC 2008


Peter;
Michiel covered most everything here. My initial check-ins are
basically the try/except you describe and it looks like Michiel has
gone further and worked on real NumPy transitions.

My opinion is to post that message to the main list and move forward
with converting to MumPy exclusively as people are able to tackle
the task for different module. Once something has been converted in
a real way, and not just using oldnumeric imports, then the
try/except can go away. I suspect not too many people will
still be stuck on Numerical, and should be excited to get up to date
with that library.

Brad


> Michiel wrote:
> >Peter wrote:
> >> 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
> >
> > 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.
> 
> Yes, if/when the oldnumeric wrapper goes away we'll have more work to
> do.  Something to worry about later.
> 
> >> 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
> 
> That suits me - how about we post something like this on the main
> discussion list then?:
> 
> Dear all,
> 
> As you probably are well aware, Biopython releases to date have used
> the now obsolete Numeric python library.  This is no longer being
> maintained and has been superseded by the numpy library.  See
> http://www.scipy.org/History_of_SciPy for more about details on the
> history of numerical python.  Biopython 1.48 should be the last
> Numeric only release of Biopython - we have already started moving to
> numpy in CVS.
> 
> Supporting both Numeric and numpy ought to be fairly straight forward
> for the pure python modules in Biopython. However, we also have C code
> which must interact with Numeric/numpy, and trying to support both
> would be harder.
> 
> Would anyone be inconvenienced if the next release of Biopython
> supported numpy ONLY (dropping support for Numeric)?  If so please
> speak up now - either here or on the development mailing list.
> Otherwise, a simple switch from Numeric to numpy will probably be the
> most straightforward migration plan.
> 
> Thank you,
> 
> ...
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev

-- 
Brad Chapman
Codon Devices 
http://www.codondevices.com




More information about the Biopython-dev mailing list