Ejemplo n.º 1
0
 def run_tests(self):
     import mdp
     import bimdp
     # Fix random seed here, as we want reproducible failures in
     # automatic builds using "python setup.py test"
     # If the tests are run manually with pytest or
     # using the mdp.test and bimdp.test functions, the seed
     # is not set
     errno = mdp.test(seed=725021957)
     errno += bimdp.test(seed=725021957)
     sys.exit(errno)
Ejemplo n.º 2
0
 def run_tests(self):
     import mdp
     import bimdp
     # Fix random seed here, as we want reproducible failures in
     # automatic builds using "python setup.py test"
     # If the tests are run manually with pytest or
     # using the mdp.test and bimdp.test functions, the seed
     # is not set
     errno = mdp.test(seed=725021957)
     errno += bimdp.test(seed=725021957)
     sys.exit(errno)
Ejemplo n.º 3
0

def covTest():
    x = array([1., 3., 8., 9.])
    variance = cov(x)                       # normalized by N-1
    variance = cov(x, bias=1)               # normalized by N
    T = array([1.3, 4.5, 2.8, 3.9])         # temperature measurements
    P = array([2.7, 8.7, 4.7, 8.2])         # corresponding pressure measurements
    cov(T,P)                                # covariance between temperature and pressure
    rho = array([8.5, 5.2, 6.9, 6.5])       # corresponding density measurements
    data = column_stack([T,P,rho])
    print T
    print P
    print rho
    print data
    print cov(data)                         # covariance matrix of T,P and rho

def describe(module):
    "Print some information about a module"
    print module.__name__, module.__file__
    
if __name__=='__main__':
    describe(numpy)
    describe(scipy)
    describe(mdp)
    describe(bimdp)
    
    covTest()
    mdp.test()
    bimdp.test()