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

All Samples(14)  |  Call(6)  |  Derive(0)  |  Import(8)

src/c/o/cogent-1.5.3/cogent/seqsim/usage.py   cogent(Download)
    ModelRnaSequence
from operator import add, sub, mul, div
from cogent.maths.matrix_logarithm import logm
from cogent.maths.stats.util import FreqsI
from cogent.maths.matrix_exponentiation import FastExponentiator as expm
    def toRates(self, normalize=False):
        """Returns rate matrix. Does not normalize by default."""
        return Rates(logm(self._data), self.Alphabet, self.Name, normalize)
 
    def random(cls, Alphabet, diags=None):

src/p/y/pycogent-HEAD/cogent/seqsim/usage.py   pycogent(Download)
    ModelRnaSequence
from operator import add, sub, mul, div
from cogent.maths.matrix_logarithm import logm
from cogent.maths.stats.util import FreqsI
from cogent.maths.matrix_exponentiation import FastExponentiator as expm
    def toRates(self, normalize=False):
        """Returns rate matrix. Does not normalize by default."""
        return Rates(logm(self._data), self.Alphabet, self.Name, normalize)
 
    def random(cls, Alphabet, diags=None):

src/c/o/cogent-1.5.3/cogent/maths/svd.py   cogent(Download)
from cogent.maths.stats.test import std # numpy.std is biased
from cogent.maths.matrix_exponentiation import FastExponentiator as expm
from cogent.maths.matrix_logarithm import logm
#note: corrcoef and cov assume rows are observations, cols are variables
from numpy import log, newaxis as NewAxis, array, zeros, product, sqrt, ravel,\

src/p/y/pycogent-HEAD/cogent/maths/svd.py   pycogent(Download)
from cogent.maths.stats.test import std # numpy.std is biased
from cogent.maths.matrix_exponentiation import FastExponentiator as expm
from cogent.maths.matrix_logarithm import logm
#note: corrcoef and cov assume rows are observations, cols are variables
from numpy import log, newaxis as NewAxis, array, zeros, product, sqrt, ravel,\

src/c/o/cogent-1.5.3/tests/test_maths/test_matrix_logarithm.py   cogent(Download)
#!/usr/bin/env python
"""Unit tests for matrix logarithm."""
from numpy import array
from cogent.util.unit_test import TestCase, main
from cogent.maths.matrix_logarithm import logm, logm_taylor
       [ 0.23022035,  0.22306947,  0.06995306,  0.47675713]])
 
        q = logm(p)
        self.assertFloatEqual(q, \
        array([[-0.15572053,  0.04947485,  0.01918653,  0.08705915],
    def test_logm_taylor(self):
        """logm_taylor should return same result as logm"""
        q_eig = logm([[ 0.86758487,  0.05575623,  0.0196798 ,  0.0569791 ],
                       [ 0.01827347,  0.93312148,  0.02109664,  0.02750842],
                       [ 0.04782582,  0.1375742 ,  0.80046869,  0.01413129],

src/p/y/pycogent-HEAD/tests/test_maths/test_matrix_logarithm.py   pycogent(Download)
#!/usr/bin/env python
"""Unit tests for matrix logarithm."""
from numpy import array
from cogent.util.unit_test import TestCase, main
from cogent.maths.matrix_logarithm import logm, logm_taylor
       [ 0.23022035,  0.22306947,  0.06995306,  0.47675713]])
 
        q = logm(p)
        self.assertFloatEqual(q, \
        array([[-0.15572053,  0.04947485,  0.01918653,  0.08705915],
    def test_logm_taylor(self):
        """logm_taylor should return same result as logm"""
        q_eig = logm([[ 0.86758487,  0.05575623,  0.0196798 ,  0.0569791 ],
                       [ 0.01827347,  0.93312148,  0.02109664,  0.02750842],
                       [ 0.04782582,  0.1375742 ,  0.80046869,  0.01413129],

src/p/y/pycogent-HEAD/tests/test_seqsim/test_usage.py   pycogent(Download)
from numpy import average, asarray, sqrt, identity, diagonal, trace, \
                  array, sum
from cogent.maths.matrix_logarithm import logm
from cogent.maths.matrix_exponentiation import FastExponentiator as expm
 

src/c/o/cogent-1.5.3/tests/test_seqsim/test_usage.py   cogent(Download)
from numpy import average, asarray, sqrt, identity, diagonal, trace, \
                  array, sum
from cogent.maths.matrix_logarithm import logm
from cogent.maths.matrix_exponentiation import FastExponentiator as expm