@@ -176,6 +176,9 @@ kmuth = Kalman(ss, x_hat_0, Σ_0)
176176# representation
177177S1, K1 = kmuth.stationary_values()
178178179+# Extract scalars from the nested array
180+S1, K1 = S1.item(), K1.item()
181+179182# Form innovation representation state-space
180183Ak, Ck, Gk, Hk = A, K1, G, 1
181184@@ -233,9 +236,6 @@ With this tool at our disposal, let’s form the composite system and
233236simulate it
234237235238```{code-cell} python3
236-# Extract the scalar K1 from the nested array
237-K1 = K1[0][0]
238-239239# Create grand state-space for y_t, a_t as observed vars -- Use
240240# stacking trick above
241241Af = np.array([[ 1, 0, 0],