In [1]:
import platform
platform.platform()


Out[1]:
'Darwin-13.3.0-x86_64-i386-64bit'

In [2]:
import sys
print sys.version


2.7.6 |Anaconda 1.9.2 (x86_64)| (default, Jan 10 2014, 11:23:15) 
[GCC 4.0.1 (Apple Inc. build 5493)]

In [3]:
import numpy
numpy.__version__


Out[3]:
'1.8.0'

In [4]:
%run test_mc_compute_stationary.py


Elements in each row of P sum to one ... ok
Elements of v sum to one ... ok
All the elements of v are nonnegative ... FAIL
v is a left eigen vector ... 
====
Testing with prameter values set 0

N = 27 , epsilon = 0.01 , move = sequential 

v =
[ -2.48255180e-02  -3.36828636e-03  -2.20038808e-04  -9.21435543e-06
  -2.77819761e-07  -6.42196414e-09  -1.18327463e-10  -1.78366133e-12
  -2.22487348e-14  -8.34484590e-17  -9.59425880e-17  -1.07363310e-16
  -1.20471395e-16  -1.35327791e-16  -1.52499877e-16  -1.72571646e-16
  -1.95756734e-16  -1.47184432e-16   8.34181730e-15   8.10541310e-13
   6.45429448e-11   4.28137221e-09   2.32361769e-07   1.00521722e-05
   3.33397045e-04   7.96152144e-03   1.21872520e-01   8.98245614e-01] 

TOL = 0.01 

====
ok
Elements in each row of P sum to one ... ok
Elements of v sum to one ... ok
All the elements of v are nonnegative ... FAIL
v is a left eigen vector ... ok
Elements in each row of P sum to one ... ok
Elements of v sum to one ... ok
All the elements of v are nonnegative ... ok
v is a left eigen vector ... 
An exception has occurred, use %tb to see the full traceback.

SystemExit: True
Testing with prameter values set 1

N = 3 , epsilon = 1e-14 , move = sequential 

P =
[[  1.00000000e+00   5.00000000e-15   0.00000000e+00   0.00000000e+00]
 [  3.33333333e-01   4.99600361e-15   6.66666667e-01   0.00000000e+00]
 [  0.00000000e+00   3.33333333e-15   6.66666667e-01   3.33333333e-01]
 [  0.00000000e+00   0.00000000e+00   5.00000000e-15   1.00000000e+00]] 

v =
[ -1.14942529e-02  -8.51809045e-17   1.48233916e-14   1.01149425e+00] 

TOL = 0.01 

====
Testing with prameter values set 2

N = 5 , epsilon = 1e-15 , move = simultaneous 

P =
[[  1.00000000e+00   2.50000000e-15   2.50000000e-30   1.25000000e-45
    3.12500000e-61   3.12500000e-77]
 [  1.00000000e+00   2.50000000e-15   2.50000000e-30   1.25000000e-45
    3.12500000e-61   3.12500000e-77]
 [  5.27109897e-77   4.74778387e-61   1.71056941e-45   3.08148791e-30
    2.77555756e-15   1.00000000e+00]
 [  5.27109897e-77   4.74778387e-61   1.71056941e-45   3.08148791e-30
    2.77555756e-15   1.00000000e+00]
 [  5.27109897e-77   4.74778387e-61   1.71056941e-45   3.08148791e-30
    2.77555756e-15   1.00000000e+00]
 [  5.27109897e-77   4.74778387e-61   1.71056941e-45   3.08148791e-30
    2.77555756e-15   1.00000000e+00]] 

v =
[  1.00000000e+00   2.60902411e-15   0.00000000e+00   0.00000000e+00
   0.00000000e+00   0.00000000e+00] 

TOL = 0.01 

ok

======================================================================
FAIL: All the elements of v are nonnegative
----------------------------------------------------------------------
Traceback (most recent call last):
  File "//anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/oyama/Dropbox/Documents/Teaching/Zemi/2014/test_mc_compute_stationary/test_mc_compute_stationary.py", line 161, in __call__
    eq_(np.prod(v >= 0-TOL), 1)
AssertionError: 0 != 1

======================================================================
FAIL: All the elements of v are nonnegative
----------------------------------------------------------------------
Traceback (most recent call last):
  File "//anaconda/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/Users/oyama/Dropbox/Documents/Teaching/Zemi/2014/test_mc_compute_stationary/test_mc_compute_stationary.py", line 161, in __call__
    eq_(np.prod(v >= 0-TOL), 1)
AssertionError: 0 != 1

----------------------------------------------------------------------
Ran 12 tests in 0.108s

FAILED (failures=2)

In [ ]: