Skip to content

Commit b4db6f2

Browse files
committed
Inserted ELIPPSIS option to doctests giving floating point significant digit errors
1 parent 1c89e6b commit b4db6f2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

doc/modules/sgd.rst

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Using ``loss="log"`` or ``loss="modified_huber"`` enables the
109109
:math:`P(y|x)` per sample :math:`x`::
110110

111111
>>> clf = SGDClassifier(loss="log").fit(X, y)
112-
>>> clf.predict_proba([[1., 1.]])
112+
>>> clf.predict_proba([[1., 1.]]) # doctest: +ELLIPSIS
113113
array([[ 0.0000005, 0.9999995]])
114114

115115
The concrete penalty can be set via the ``penalty`` parameter.

doc/tutorial/statistical_inference/supervised_learning.rst

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Linear models: :math:`y = X\beta + \epsilon`
175175
>>> regr = linear_model.LinearRegression()
176176
>>> regr.fit(diabetes_X_train, diabetes_y_train)
177177
LinearRegression(copy_X=True, fit_intercept=True, normalize=False)
178-
>>> print(regr.coef_)
178+
>>> print(regr.coef_) # doctest: +ELLIPSIS
179179
[ 0.30349955 -237.63931533 510.53060544 327.73698041 -814.13170937
180180
492.81458798 102.84845219 184.60648906 743.51961675 76.09517222]
181181

0 commit comments

Comments
 (0)