[Biopython-dev] [Bug 2631] Updated Bio.MaxEntropy to remove listfns import

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Oct 27 16:16:52 UTC 2008


http://bugzilla.open-bio.org/show_bug.cgi?id=2631





------- Comment #3 from biopython-bugzilla at maubp.freeserve.co.uk  2008-10-27 12:16 EST -------
I don't know if it matters for MaxEntropy, but your re-implementation of
Bio.listfns.itemindex does not preserve the current behaviour with duplicate
entries:

>>> x = [1,2,3,3,2,5]
>>> from Bio.listfns import itemindex
>>> itemindex(x)
{1: 0, 2: 1, 3: 2, 5: 5}
>>> class2index ={}
>>> for i, j in enumerate(x):
        class2index.update({j:i})

>>> class2index
{1: 0, 2: 4, 3: 3, 5: 5}


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Biopython-dev mailing list