Did I find the right examples for you? yes no      Crawl my project      Python Jobs

cogent.maths.svd.two_item_combos

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/cogent/seqsim/analysis.py   cogent(Download)
```                  float64, max, min, average, any, pi
from cogent.util.array import without_diag
from cogent.maths.svd import three_item_combos, two_item_combos
from cogent.maths.stats.test import std

```
```    if average:
#return symmetric matrix
for first, second in two_item_combos(leaves):
seq_1 = getattr(first, attr)
seq_2 = getattr(second, attr)
result[(first.Id, second.Id)] = \
Counts.fromPair(seq_1, seq_2, alphabet)
else:
for first, second in two_item_combos(leaves):
```

src/p/y/pycogent-HEAD/cogent/seqsim/analysis.py   pycogent(Download)
```                  float64, max, min, average, any, pi
from cogent.util.array import without_diag
from cogent.maths.svd import three_item_combos, two_item_combos
from cogent.maths.stats.test import std

```
```    if average:
#return symmetric matrix
for first, second in two_item_combos(leaves):
seq_1 = getattr(first, attr)
seq_2 = getattr(second, attr)
result[(first.Id, second.Id)] = \
Counts.fromPair(seq_1, seq_2, alphabet)
else:
for first, second in two_item_combos(leaves):
```

src/c/o/cogent-1.5.3/tests/test_maths/test_svd.py   cogent(Download)
```#!/usr/bin/env python
"""Unit tests for the svd-supporting functionality."""

from cogent.util.unit_test import TestCase, main
from cogent.maths.svd import ratio_two_best, ratio_best_to_sum, \
```
```    def test_two_item_combos(self):
"""two_item_combos should return items in correct order"""
items = list(two_item_combos('abcd'))
self.assertEqual(items, map(tuple, ['ab','ac','ad','bc','bd','cd']))

```

src/p/y/pycogent-HEAD/tests/test_maths/test_svd.py   pycogent(Download)
```#!/usr/bin/env python
"""Unit tests for the svd-supporting functionality."""

from cogent.util.unit_test import TestCase, main
from cogent.maths.svd import ratio_two_best, ratio_best_to_sum, \
```
```    def test_two_item_combos(self):
"""two_item_combos should return items in correct order"""
items = list(two_item_combos('abcd'))
self.assertEqual(items, map(tuple, ['ab','ac','ad','bc','bd','cd']))

```