diff --git a/skutil/utils/fixes.py b/skutil/utils/fixes.py index 0b4f4e1..cd6accf 100644 --- a/skutil/utils/fixes.py +++ b/skutil/utils/fixes.py @@ -14,6 +14,7 @@ import pandas as pd import sklearn import sys +from types import NoneType from abc import ABCMeta, abstractmethod from sklearn.base import BaseEstimator, MetaEstimatorMixin, is_classifier, clone from sklearn.externals import six @@ -656,7 +657,7 @@ def _fit(self, X, y, parameter_iterable): # for debugging assert isinstance(X, np.ndarray) - assert isinstance(y, (np.ndarray, None)) + assert isinstance(y, (np.ndarray, NoneType)) # begin sklearn code estimator = self.estimator