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

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

src/c/o/cogent-1.5.3/tests/test_maths/test_stats/test_period.py   cogent(Download)
import numpy
from cogent.util.unit_test import TestCase, main
 
from cogent.maths.stats.period import chi_square, factorial, g_statistic, \
        circular_indices, _seq_to_symbols, seq_to_symbols, blockwise_bootstrap, \
        symbols = _seq_to_symbols('AATGGTTA', motifs, 2)
        self.assertEqual(symbols, numpy.array([1,1,0,0,0,1,0,0]))
        symbols = seq_to_symbols('AAGATT', motifs, 2, numpy.zeros(6, numpy.uint8))
        self.assertEqual(symbols, numpy.array([1,0,0,1,1,0]))
 

src/p/y/pycogent-HEAD/tests/test_maths/test_stats/test_period.py   pycogent(Download)
import numpy
from cogent.util.unit_test import TestCase, main
 
from cogent.maths.stats.period import chi_square, factorial, g_statistic, \
        circular_indices, _seq_to_symbols, seq_to_symbols, blockwise_bootstrap, \
        symbols = _seq_to_symbols('AATGGTTA', motifs, 2)
        self.assertEqual(symbols, numpy.array([1,1,0,0,0,1,0,0]))
        symbols = seq_to_symbols('AAGATT', motifs, 2, numpy.zeros(6, numpy.uint8))
        self.assertEqual(symbols, numpy.array([1,0,0,1,1,0]))