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

All Samples(12)  |  Call(8)  |  Derive(0)  |  Import(4)

src/c/o/cogent-1.5.3/tests/test_maths/test_period.py   cogent(Download)
from numpy import arange, convolve, random, sin, pi, exp, array, zeros, float64
from cogent.util.unit_test import TestCase, main
 
from cogent.maths.period import ipdft, dft, auto_corr, hybrid, goertzel
 
    def test_autocorr(self):
        """correctly compute autocorrelation"""
        s = [1,1,1,1]
        X, periods = auto_corr(s, llim=-3, ulim=None)
        exp_X = array([1,2,3,4,3,2,1], dtype=float)
        self.assertEqual(X, exp_X)
 
        auto_x, auto_periods = auto_corr(self.sig, llim=2, ulim=50)
    def test_hybrid_returns_all(self):
        """correctly returns hybrid, ipdft and autocorr statistics"""
        ipdft_pwr, ipdft_prd = ipdft(self.sig, llim=2, ulim=50)
        auto_x, auto_periods = auto_corr(self.sig, llim=2, ulim=50)
        hybrid_x, hybrid_periods = hybrid(self.sig, llim=None, ulim=50)
 
        ipdft_pwr, ipdft_prd = ipdft(self.sig, llim=10, ulim=10)
        auto_x, auto_periods = auto_corr(self.sig, llim=10, ulim=10)
        hybrid_x, hybrid_periods = hybrid(self.sig, llim=10, ulim=10)
        hybrid_ipdft_autocorr_stats, hybrid_periods = hybrid(self.sig,

src/p/y/pycogent-HEAD/tests/test_maths/test_period.py   pycogent(Download)
from numpy import arange, convolve, random, sin, pi, exp, array, zeros, float64
from cogent.util.unit_test import TestCase, main
 
from cogent.maths.period import ipdft, dft, auto_corr, hybrid, goertzel
 
    def test_autocorr(self):
        """correctly compute autocorrelation"""
        s = [1,1,1,1]
        X, periods = auto_corr(s, llim=-3, ulim=None)
        exp_X = array([1,2,3,4,3,2,1], dtype=float)
        self.assertEqual(X, exp_X)
 
        auto_x, auto_periods = auto_corr(self.sig, llim=2, ulim=50)
    def test_hybrid_returns_all(self):
        """correctly returns hybrid, ipdft and autocorr statistics"""
        ipdft_pwr, ipdft_prd = ipdft(self.sig, llim=2, ulim=50)
        auto_x, auto_periods = auto_corr(self.sig, llim=2, ulim=50)
        hybrid_x, hybrid_periods = hybrid(self.sig, llim=None, ulim=50)
 
        ipdft_pwr, ipdft_prd = ipdft(self.sig, llim=10, ulim=10)
        auto_x, auto_periods = auto_corr(self.sig, llim=10, ulim=10)
        hybrid_x, hybrid_periods = hybrid(self.sig, llim=10, ulim=10)
        hybrid_ipdft_autocorr_stats, hybrid_periods = hybrid(self.sig,

src/p/y/pycogent-HEAD/tests/test_maths/test_stats/test_period.py   pycogent(Download)
        circular_indices, _seq_to_symbols, seq_to_symbols, blockwise_bootstrap, \
        SeqToSymbols
from cogent.maths.period import ipdft, hybrid, auto_corr, Hybrid, Ipdft, \
        AutoCorrelation
 

src/c/o/cogent-1.5.3/tests/test_maths/test_stats/test_period.py   cogent(Download)
        circular_indices, _seq_to_symbols, seq_to_symbols, blockwise_bootstrap, \
        SeqToSymbols
from cogent.maths.period import ipdft, hybrid, auto_corr, Hybrid, Ipdft, \
        AutoCorrelation