Michiel de Hoon
mjldehoon at yahoo.com
Sat Oct 30 11:39:46 UTC 2010
Currently there is a pure-Python fall back for _logadd in MarkovModel.py. We could check if the numpy version is at least 1.3 in setup.py, show a warning if an older numpy is found, and use the fall back in MarkovModel.py if numpy does not contain logaddexp. Then if we remove cMarkovModelmodule.c, in the worst case (a Windows user with Python 2.4 who cannot update to a more recent Python) MarkovModel.py will be a bit slower, but no functionality is lost.
--- On Sat, 10/30/10, Peter <biopython at maubp.freeserve.co.uk> wrote:
> From: Peter <biopython at maubp.freeserve.co.uk>
> Subject: Re: [Biopython-dev] Bio/cMarkovModelmodule.c
> To: "Michiel de Hoon" <mjldehoon at yahoo.com>
> Cc: biopython-dev at biopython.org
> Date: Saturday, October 30, 2010, 6:47 AM
> On Sat, Oct 30, 2010 at 5:13 AM,
> Michiel de Hoon wrote:
> > Hi everybody,
> > I was looking at our C modules to see if they can be
> > ready for Python 3. I noticed that
> > currently contains only one function, _logadd, which
> is used
> > to speed up Bio.MarkovModel. Numpy 1.3 and later
> > a function (logaddexp) that does exactly the same as
> > Since Bio.MarkovModel itself already uses Numpy, I
> > we can remove Bio/cMarkovModelmodule.c.
> Sounds good :)
> > For this to work, we either need to require Numpy
> >= 1.3
> > in setup.py, or check for logaddexp when importing
> > in Bio.MarkovModel. I think requiring Numpy >= 1.3
> > setup.py is better in the long run, so I would prefer
> > Any other opinions?
> The setup.py check sounds best.
> We should check Numpy >= 1.3 is will be available for
> Python 2.4 - this is relevant for Biopython 1.56 which
> will still support Python 2.4
> The most recent NumPy for Windows installer
> for Python 2.4 was NumPy 1.2.1, but most Windows
> users able to install Biopython via our Windows
> installer would also be able to install a more recent
> Python and NumPy - so not a big issue.
> According to the old INSTALL.txt in Nump's github
> repository it says that for numpy 1.3.0 they still
> supported Python 2.4.
> If there is any doubt about getting NumPy 1.3.x on
> Python 2.4, we could postpone this change until
> after we do the Biopython 1.56 release (probably in
> November 2010) and drop support for Python 2.4.
More information about the Biopython-dev