90
90
import sys
91
91
from .graph_tools import DiGraph
92
92
from .gth_solve import gth_solve
93
- from warnings import warn
94
93
95
- #-Check if Numba is Available-#
94
+ # -Check if Numba is Available- #
96
95
from .external import numba_installed , jit
97
96
from .utilities import searchsorted
98
97
98
+
99
99
class MarkovChain (object ):
100
100
"""
101
101
Class for a finite-state discrete-time Markov chain. It stores
@@ -308,11 +308,11 @@ def mc_sample_path(P, init=0, sample_size=1000):
308
308
mc_sample_path = jit (mc_sample_path )
309
309
310
310
311
- #------------#
312
- #-DocStrings-#
313
- #------------#
311
+ # ------------ #
312
+ # -DocStrings- #
313
+ # ------------ #
314
314
315
- #-mc_sample_path() function and MarkovChain.simulate() method-#
315
+ # -mc_sample_path() function and MarkovChain.simulate() method- #
316
316
_sample_path_docstr = \
317
317
"""
318
318
Generates one sample path from the Markov chain represented by (n x n)
@@ -336,9 +336,9 @@ def mc_sample_path(P, init=0, sample_size=1000):
336
336
337
337
"""
338
338
339
- #-Functions-#
339
+ # -Functions- #
340
340
341
- #-mc_sample_path-#
341
+ # -mc_sample_path- #
342
342
mc_sample_path .__doc__ = _sample_path_docstr .format (p_arg = """
343
343
P : array_like(float, ndim=2)
344
344
A Markov transition matrix.
@@ -348,10 +348,11 @@ def mc_sample_path(P, init=0, sample_size=1000):
348
348
A Markov transition matrix.
349
349
""" )
350
350
351
- #-Methods-#
351
+ # -Methods- #
352
352
353
- #-Markovchain.simulate()-#
353
+ # -Markovchain.simulate()- #
354
354
if sys .version_info [0 ] == 3 :
355
355
MarkovChain .simulate .__doc__ = _sample_path_docstr .format (p_arg = "" )
356
356
elif sys .version_info [0 ] == 2 :
357
- MarkovChain .simulate .__func__ .__doc__ = _sample_path_docstr .format (p_arg = "" )
357
+ MarkovChain .simulate .__func__ .__doc__ = \
358
+ _sample_path_docstr .format (p_arg = "" )
0 commit comments