Skip to content

Commit 52be0cc

Browse files
committed
Avoid collections.abc for py2
1 parent 2eef640 commit 52be0cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/datasets/openml.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from functools import wraps
99
import warnings
1010
import itertools
11-
from collections.abc import Generator
11+
import inspect
1212

1313
try:
1414
# Python 3+
@@ -249,7 +249,7 @@ def _convert_arff_data(arff_data, col_slice_x, col_slice_y, shape=None):
249249
X : np.array or scipy.sparse.csr_matrix
250250
y : np.array
251251
"""
252-
if isinstance(arff_data, Generator):
252+
if inspect.isgenerator(arff_data):
253253
if shape[0] == -1:
254254
count = -1
255255
else:

0 commit comments

Comments
 (0)