GitHub

@@ -922,7 +922,7 @@ Consider the following primitives

922922923923

```{code-cell} python3

924924

n = 5

925-

P = 0.0125 * np.ones((n, n))

925+

P = np.full((n, n), 0.0125)

926926

P += np.diag(0.95 - 0.0125 * np.ones(5))

927927

# State values of the Markov chain

928928

s = np.array([0.95, 0.975, 1.0, 1.025, 1.05])

@@ -1010,7 +1010,7 @@ First, let's enter the parameters:

1010101010111011

```{code-cell} python3

10121012

n = 5

1013-

P = 0.0125 * np.ones((n, n))

1013+

P = np.full((n, n), 0.0125)

10141014

P += np.diag(0.95 - 0.0125 * np.ones(5))

10151015

s = np.array([0.95, 0.975, 1.0, 1.025, 1.05]) # State values

10161016

mc = qe.MarkovChain(P, state_values=s)

Read the original on github.com ↗