[BioPython] NumPy changes ready to check in

Peter Cock p.j.a.cock at googlemail.com
Mon Sep 1 15:08:06 EDT 2008


On Mon, Sep 1, 2008 at 7:48 PM, Brad Chapman <chapmanb at 50mail.com> wrote:
> Hi all;
> Hope everyone is doing well. Nice to see many familiar faces on the
> lists.

Wow - welcome back!

> 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.

This on the fly system is great for the pure python code...

> 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.

Its certainly the C/C++ bits that make life complicated.

Have you looked at the patch on Bug 2251 at all?
http://bugzilla.open-bio.org/show_bug.cgi?id=2251

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

Michiel and I had chatted about doing one more release with Numeric
only - there are a few things I'd like to try and get in first like
ambiguous translation (Bug 2530) but perhaps we should just do
Biopython 1.48 pretty much as is.
http://bugzilla.open-bio.org/show_bug.cgi?id=2530

I'm happy to try and put together the release this week - but will
need a hand for the windows builds.

If that pans out, then we could start the Numeric to numpy transition in CVS.

Peter


More information about the BioPython mailing list