biocore/biom-format — pull request #483 by wasade (2014-06-22 18:42:45+00:00)
Title: Pairwise iter

Added `Table.iter_pairwise` in preparation for diversity calculations and for easy mapping with IPython parallel. For instance, the following should work:

```python
from IPython.parallel import Client
from functools import partial

table_of_interest = some_table

def pdist_wrapped(func, paired):
(vals_i, id_i, md_i), (vals_j, id_j, md_j) = paired
return (id_i, id_j, func(vals_i, vals_j))

pdist_partial = partial(pdist_wrapped, func_of_interest)
clients = Client()
bv = clients.load_balanced_view()
bv.map_async(pdist_partial, table_of_interest.iter_pairwise())
```

...though that hasn't been tested yet