[Biopython-dev] Versions of numpy/Numeric

Bruce Southey bsouthey at gmail.com
Wed Sep 24 19:22:35 UTC 2008


Peter wrote:
> Hi again,
>
> I was wondering what versions of numpy and Numeric have been tested
> with Biopython CVS?  For anyone who didn't know, you can check at the
> python prompt with:
>
> import numpy
> print numpy.version.version
>
> and,
>
> import Numeric
> print Numeric.__version__
>
> Using CVS Biopython compiled from source, the unit tests all seem fine
> on the following three setups:
>
> Mac OS X, python 2.5.2, Numeric 24.2 and numpy 1.1.1
> Test suite looks fine
>
> Linux, python 2.5, Numeric 24.2 and numpy 1.0
> Fine, ignoring the Numeric eigenvalue problem in
> test_SVDSuperimposer.py previously discussed
>
> Linux, python 2.3, numpy 1.1.1 [no Numeric]
> Fine, after fixing some broken imports which were using recent python
> syntax, and reducing the number of decimal places used in
> test_SVDSuperimposer.py (numpy and Numeric give very slightly
> different answers).
>
> Note that testing where there is NO version of Numeric is important
> (as in this third example), as if both numpy and Numeric are installed
> currently most of the pure python modules will use Numeric by choice.
>
> Also note that running the test suite via run_tests.py will hide any
> deprecation warnings from numpy - I tried running
> test_SVDSuperimposer.py on its own and got:
> /home/xxx/lib/python2.3/site-packages/numpy/lib/utils.py:114:
> DeprecationWarning: ('matrixmultiply is deprecated, use dot',)
> I've now updated Bio/SVDSuperimposer/SVDSuperimposer.py to use dot
> instead of matrixmultiply (this works on both numpy and Numeric).
>
> Peter
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev
>
>   
Hi,
With Numeric 24.2 and Numpy 1.2rc2 installed on linux 64bit and Python 
2.5.1.

python python setup.py test gives several deprecation warnings from 
test_Cluster and test_KDTree but still pass.

test_MarkovModel fails as I found with BioPython 1.48 (Bug 2589). This 
is most likely a 64-bit thing with Python 2.5.

ERROR: test_MarkovModel                                              
----------------------------------------------------------------------
Traceback (most recent call last):                                   
  File "run_tests.py", line 152, in runTest                          
    self.runSafeTest()                                               
  File "run_tests.py", line 165, in runSafeTest                      
    cur_test = __import__(self.test_name)                            
  File "test_MarkovModel.py", line 65, in <module>                   
    p_emission=p_emission                                            
  File 
"/home/bsouthey/python/biopython_cvs/biopython/build/lib.linux-x86_64-2.5/Bio/MarkovModel.py", 
line 220, in _baum_welch
    lpseudo_initial, lpseudo_transition, 
lpseudo_emission,)                                                                   

  File 
"/home/bsouthey/python/biopython_cvs/biopython/build/lib.linux-x86_64-2.5/Bio/MarkovModel.py", 
line 276, in _baum_welch_one
    lp_initial[:] = lp_arcout_t[:,0]             

I did notice that both test_MarkovModel.py and test_SVDSuperimposer.py 
have first try to import Numeric - as does MarkovModel.py. However this 
same bug is still likely since numpy.oldnumeric is used.

Regards
Bruce





More information about the Biopython-dev mailing list