From 3be3de1fd28780c3c8356f32fe0d96c65514dcaf Mon Sep 17 00:00:00 2001 From: Fabian Pedregosa <fabian.pedregosa@inria.fr> Date: Fri, 2 Sep 2011 11:37:46 +0200 Subject: [PATCH] Add a compatibility layer for some modules. OK, there are a bunch of ``import *``, but I don't see any other reasonable way ... --- scikits/learn/__init__.py | 3 +++ scikits/learn/cluster/__init__.py | 3 +++ scikits/learn/datasets/__init__.py | 3 +++ scikits/learn/decomposition/__init__.py | 3 +++ scikits/learn/grid_search.py | 3 +++ scikits/learn/linear_model/__init__.py | 3 +++ scikits/learn/svm/__init__.py | 3 +++ 7 files changed, 21 insertions(+) create mode 100644 scikits/learn/__init__.py create mode 100644 scikits/learn/cluster/__init__.py create mode 100644 scikits/learn/datasets/__init__.py create mode 100644 scikits/learn/decomposition/__init__.py create mode 100644 scikits/learn/grid_search.py create mode 100644 scikits/learn/linear_model/__init__.py create mode 100644 scikits/learn/svm/__init__.py diff --git a/scikits/learn/__init__.py b/scikits/learn/__init__.py new file mode 100644 index 0000000000..f24786b0c3 --- /dev/null +++ b/scikits/learn/__init__.py @@ -0,0 +1,3 @@ +import warnings +warnings.warn('scikits.learn namespace is deprecated, please use sklearn instead') +from sklearn import * diff --git a/scikits/learn/cluster/__init__.py b/scikits/learn/cluster/__init__.py new file mode 100644 index 0000000000..cbfd6ffb46 --- /dev/null +++ b/scikits/learn/cluster/__init__.py @@ -0,0 +1,3 @@ +import warnings +warnings.warn('scikits.learn is deprecated, please use sklearn') +from sklearn.cluster import * \ No newline at end of file diff --git a/scikits/learn/datasets/__init__.py b/scikits/learn/datasets/__init__.py new file mode 100644 index 0000000000..21cdab038e --- /dev/null +++ b/scikits/learn/datasets/__init__.py @@ -0,0 +1,3 @@ +import warnings +warnings.warn('scikits.learn is deprecated, please use sklearn') +from sklearn.datasets import * \ No newline at end of file diff --git a/scikits/learn/decomposition/__init__.py b/scikits/learn/decomposition/__init__.py new file mode 100644 index 0000000000..3943c2ed8d --- /dev/null +++ b/scikits/learn/decomposition/__init__.py @@ -0,0 +1,3 @@ +import warnings +warnings.warn('scikits.learn namespace is deprecated, please use sklearn instead') +from sklearn.decomposition import * \ No newline at end of file diff --git a/scikits/learn/grid_search.py b/scikits/learn/grid_search.py new file mode 100644 index 0000000000..2845452d89 --- /dev/null +++ b/scikits/learn/grid_search.py @@ -0,0 +1,3 @@ +import warnings +warnings.warn('scikits.learn namespace is deprecated, please use sklearn instead') +from sklearn.grid_search import * \ No newline at end of file diff --git a/scikits/learn/linear_model/__init__.py b/scikits/learn/linear_model/__init__.py new file mode 100644 index 0000000000..e5c35727ae --- /dev/null +++ b/scikits/learn/linear_model/__init__.py @@ -0,0 +1,3 @@ +import warnings +warnings.warn('scikits.learn is deprecated, please use sklearn') +from sklearn.linear_model import * \ No newline at end of file diff --git a/scikits/learn/svm/__init__.py b/scikits/learn/svm/__init__.py new file mode 100644 index 0000000000..d55c2551b5 --- /dev/null +++ b/scikits/learn/svm/__init__.py @@ -0,0 +1,3 @@ +import warnings +warnings.warn('scikits.learn is deprecated, please use sklearn') +from sklearn.svm import * \ No newline at end of file -- GitLab