<jupyter_start><jupyter_text>Exercise 3.17from <NAME>'s book<jupyter_code>import numpy as np
from numpy.linalg import matrix_power as mp

P=np.array([
    [0.5, 0.5],
    [0.0, 1.0]
])
mp(P,1000)
series_sum = 0
for i in range(1001):
    series_sum+=mp(P,i)
series_sum<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.06734006734006734, 'mean_word_length': 5.081632653061225, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '89624', 'license': 'MIT', 'n_tokens_mistral': 144, 'n_tokens_neox': 132, 'n_words': 27, 'path': 'Exercise 3-17.ipynb', 'repo_name': 'Lonitch/stochastic-process', 'size': '304'}