From 998cd32cf57e29fa19184c3c2453b9ba667b1172 Mon Sep 17 00:00:00 2001 From: Federico Tomasi Date: Fri, 17 Feb 2017 14:53:24 +0100 Subject: [PATCH] new style class --- adenine/utils/extensions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/adenine/utils/extensions.py b/adenine/utils/extensions.py index 080a08c..37e1aac 100644 --- a/adenine/utils/extensions.py +++ b/adenine/utils/extensions.py @@ -31,10 +31,13 @@ if sys.version_info >= (3, 0): imap = map + def map(*args, **kwargs): + """Forward compatibility with python3.""" return list(imap(*args, **kwargs)) -class DummyNone: + +class DummyNone(object): """Dummy class that does nothing. It is a sklearn 'transforms', it implements both a fit and a transform @@ -213,6 +216,7 @@ class GridSearchCV(GridSearchCV): Automatically detects the optimal number of clusters for centroid-based algorithms like KMeans and Affinity Propagation. """ + def __init__(self, estimator, param_grid, scoring=None, fit_params=None, n_jobs=1, iid=True, refit=True, cv=None, verbose=0, pre_dispatch='2*n_jobs', error_score='raise',