How to populate all possible hierarchical clusterings from a set of elements?
DevPlayer
devplayer at gmail.com
Thu Jan 13 05:29:32 EST 2011
More information about the Python-list mailing list
Thu Jan 13 05:29:32 EST 2011
- Previous message (by thread): How to populate all possible hierarchical clusterings from a set of elements?
- Next message (by thread): How to populate all possible hierarchical clusterings from a set of elements?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
tuple([ (tuple(lst[x-1:x+1]) if len(tuple(lst[x-1:x+1]))==2 else lst[x-1]) for x in lst[::2]]) ((1, 2), (3, 4), 5) # or x = ((tuple(lst[x-1:x+1]) if len(tuple(lst[x-1:x+1]))==2 else lst[x-1]) for x in lst[::2]) x.next() (1, 2) x.next() (3, 4) x.next() 5
- Previous message (by thread): How to populate all possible hierarchical clusterings from a set of elements?
- Next message (by thread): How to populate all possible hierarchical clusterings from a set of elements?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list