[BioPython] NumPy changes ready to check in

Brad Chapman chapmanb at 50mail.com
Mon Sep 1 18:48:24 UTC 2008


Hi all;
Hope everyone is doing well. Nice to see many familiar faces on the
lists. The NumPy discussion over the past couple of days is very timely,
as I was hoping to get permission to check in changes to convert over to
NumPy with very reasonable back compatibility with Numeric.

Recently, I wanted to utilize the PDB parser, and realized it still
used the old Numeric module. Over the last few evenings, I made the
adjustments and made sure things are not broken based on regression
and simple script testing.

The changes are fairly extensive in terms of modules touched, but
limited in terms of the actual change. All python level changes use
the "oldnumeric" compatibility layer if the Numeric import fails:

try:
    from Numeric import array, Float0
except ImportError:
    from numpy.oldnumeric import array, Float0

So if people are still using Numeric, these changes should not impact
them, but will allow use of NumPy if desired. Over time we would
probably want to get rid of the Numeric imports as everyone moves to
NumPy.

The C/C++ changes are limited to KDTree and Cluster and are not back
compatible, but do not require code level changes over than the
imports as they also use the C compatibility layer in NumPy. So the
major transition point would be people using KDTree and Cluster to
install NumPy.

I still have my CVS account and can check in these changes if y'all
approve. Thanks all,

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




More information about the Biopython mailing list