[Biopython-dev] test_MarkovModel.py and Numeric/numpy work?

Peter biopython at maubp.freeserve.co.uk
Mon Sep 22 13:46:48 UTC 2008


On Sat, Sep 20, 2008 at 4:00 AM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
>
> This is an example where the old Numerical Python and the new NumPy need different code at the Python-level.
> ...

Thanks for the explanation :)

> Let's first see if anybody wants to continue using the old Numerical Python.
> If so, we can add some try:except: around the call to p_initial.any(). If not,
> then Brad's code is fine.

I've added a try/except to stop the failing unit test when Numeric is
installed.  This should now work with either Numeric or numpy.

Having the current fall back import system (trying to import Numeric,
falling back on importing numpy) makes sense for transition releases
with support for both.  However, if we all agree to do a straight
switch from Numeric to numpy for Biopython 1.49, then I think we
shouldn't try importing from Numeric at all.

Peter



More information about the Biopython-dev mailing list