Skip to content

Commit

Permalink
address long lines of error messages in the docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
weikang9009 committed Oct 24, 2023
1 parent 13f7167 commit 3e62357
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions giddy/ergodic.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,11 @@ def steady_state(P, fill_empty_classes=False):
>>> steady_state(p, fill_empty_classes = False)
Traceback (most recent call last):
...
ValueError: Input transition probability matrix has 1 rows full of 0s. Please set fill_empty_classes=True to set diagonal elements for these rows to be 1 to make sure the matrix is stochastic.
ValueError: Input transition probability matrix has 1 rows full of 0s. \
Please set fill_empty_classes=True to set diagonal elements for these \
rows to be 1 to make sure the matrix is stochastic.
""" # noqa E501
"""

P = np.asarray(P)
rows0 = (P.sum(axis=1) == 0).sum()
Expand Down Expand Up @@ -294,8 +296,10 @@ def mfpt(P, fill_empty_classes=False):
>>> mfpt(p, fill_empty_classes=False)
Traceback (most recent call last):
...
ValueError: Input transition probability matrix has 1 rows full of 0s. Please set fill_empty_classes=True to set diagonal elements for these rows to be 1 to make sure the matrix is stochastic.
""" # noqa E501
ValueError: Input transition probability matrix has 1 rows full of 0s. \
Please set fill_empty_classes=True to set diagonal elements for these \
rows to be 1 to make sure the matrix is stochastic.
"""

P = np.asarray(P)
rows0 = (P.sum(axis=1) == 0).sum()
Expand Down

0 comments on commit 3e62357

Please sign in to comment.