Skip to content

Commit 923540e

Browse files
committed
Missing value location
1 parent 90deb17 commit 923540e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

codonPython/tolerance.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def check_tolerance(t, y, to_exclude: int = 1, poly_features: list = [1, 2], alp
3131
Returns
3232
-------
3333
pd.DataFrame
34-
DataFrame of shape (to_exclude, 4) containing:
34+
DataFrame containing:
3535
"yhat_u" : Upper condfidence interval for y
3636
"yobs" : Observed value for y
3737
"yhat" : Predicted value for y
@@ -67,10 +67,12 @@ def check_tolerance(t, y, to_exclude: int = 1, poly_features: list = [1, 2], alp
6767
model. Either reduce to_exclude or increase your sample size to continue."""
6868
)
6969
assert np.isfinite(y).all(), (
70-
"Your sample contains missing or infinite values for y. Exclude these values to continue."
70+
f"""Your sample contains missing or infinite values for y at locations
71+
{list(map(tuple, np.where(np.isnan(y))))}. Exclude these values to continue."""
7172
)
7273
assert np.isfinite(t).all(), (
73-
"Your sample contains missing or infinite values for x. Exclude these values to continue."
74+
f"""Your sample contains missing or infinite values for t at locations
75+
{list(map(tuple, np.where(np.isnan(t))))}. Exclude these values to continue."""
7476
)
7577

7678

0 commit comments

Comments
 (0)