[Biopython-dev] test_MarkovModel.py and Numeric/numpy work?
Peter
biopython at maubp.freeserve.co.uk
Thu Sep 18 15:00:16 UTC 2008
Hi all,
I'm back from my one week holiday, and after I updated my machine I'm
seeing a new failure in test_MarkovModel.py is probably related to the
Numeric/numpy work,
$ python run_tests.py test_MarkovModel.py
test_MarkovModel ... ERROR
(output cut)
$python test_MarkovModel.py
TESTING train_visible
Training HMM
Classifying
[(['0', '0', '1', '2', '3', '3'], 0.0082128906250000053)]
STATES: 0 1 2 3
ALPHABET: A C G T
INITIAL:
0: 1.00
1: 0.00
2: 0.00
3: 0.00
TRANSITION:
0: 0.20 0.80 0.00 0.00
1: 0.00 0.50 0.50 0.00
2: 0.00 0.00 0.50 0.50
3: 0.00 0.00 0.00 1.00
EMISSION:
0: 0.67 0.11 0.11 0.11
1: 0.08 0.75 0.08 0.08
2: 0.08 0.08 0.75 0.08
3: 0.03 0.03 0.03 0.91
TESTING baum welch
Training HMM
Traceback (most recent call last):
File "test_MarkovModel.py", line 64, in <module>
p_emission=p_emission
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/Bio/MarkovModel.py",
line 181, in _baum_welch
if not p_initial.any():
AttributeError: any
$ python
Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Numeric
>>> Numeric.__version__
'24.2'
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>>
The above is on Mac OS X 10.5 (Tiger) with Numeric installed, but not
numpy. I see something similar but slightly different on a Linux
machine with both Numeric and an old version of numpy.
Looking at the CVS log, I wonder if this is due to the switch from an
array based or, to an if based manipulation of p_initial, p_transition
and p_emission?
http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/MarkovModel.py.diff?r1=1.3&r2=1.4&cvsroot=biopython
Peter
More information about the Biopython-dev
mailing list