Skip to content

Commit 61226a2

Browse files
committed
Fix up last doc tests.
1 parent 91ececa commit 61226a2

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

sklearn/grid_search.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ class ParameterGrid(object):
5757
--------
5858
>>> from sklearn.grid_search import ParameterGrid
5959
>>> param_grid = {'a': [1, 2], 'b': [True, False]}
60-
>>> list(ParameterGrid(param_grid)) #doctest: +NORMALIZE_WHITESPACE
61-
[{'a': 1, 'b': True}, {'a': 1, 'b': False},
62-
{'a': 2, 'b': True}, {'a': 2, 'b': False}]
60+
>>> list(ParameterGrid(param_grid)) == (
61+
... [{'a': 1, 'b': True}, {'a': 1, 'b': False},
62+
... {'a': 2, 'b': True}, {'a': 2, 'b': False}])
63+
True
6364
6465
>>> grid = [{'kernel': ['linear']}, {'kernel': ['rbf'], 'gamma': [1, 10]}]
6566
>>> list(ParameterGrid(grid)) == [{'kernel': 'linear'},
@@ -131,9 +132,10 @@ class IterGrid(ParameterGrid):
131132
--------
132133
>>> from sklearn.grid_search import IterGrid
133134
>>> param_grid = {'a':[1, 2], 'b':[True, False]}
134-
>>> list(IterGrid(param_grid)) #doctest: +NORMALIZE_WHITESPACE
135-
[{'a': 1, 'b': True}, {'a': 1, 'b': False},
136-
{'a': 2, 'b': True}, {'a': 2, 'b': False}]
135+
>>> list(IterGrid(param_grid)) == (
136+
... [{'a': 1, 'b': True}, {'a': 1, 'b': False},
137+
... {'a': 2, 'b': True}, {'a': 2, 'b': False}])
138+
True
137139
138140
See also
139141
--------

0 commit comments

Comments
 (0)