Skip to content

Commit f2bbf32

Browse files
committed
updated to support Python 3
1 parent bbda9d0 commit f2bbf32

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Updated to support Python 3. The original documentation is below, and all credit to the original author.
2+
3+
__Zao Wu__
4+
5+
16
Python-ELM v0.3
27
===============
38

__init__.py

Whitespace-only changes.

elm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from sklearn.base import BaseEstimator, ClassifierMixin, RegressorMixin
3232
from sklearn.preprocessing import LabelBinarizer
3333

34-
from random_layer import RandomLayer, MLPRandomLayer
34+
from .random_layer import RandomLayer, MLPRandomLayer
3535

3636
__all__ = ["ELMRegressor",
3737
"ELMClassifier",

random_layer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from scipy.spatial.distance import cdist, pdist, squareform
2525

2626
from sklearn.metrics import pairwise_distances
27-
from sklearn.utils import check_random_state, atleast2d_or_csr
27+
from sklearn.utils import check_random_state, check_array
2828
from sklearn.utils.extmath import safe_sparse_dot
2929
from sklearn.base import BaseEstimator, TransformerMixin
3030

@@ -108,7 +108,7 @@ def fit(self, X, y=None):
108108
-------
109109
self
110110
"""
111-
X = atleast2d_or_csr(X)
111+
X = check_array(X)
112112

113113
self._generate_components(X)
114114

@@ -130,7 +130,7 @@ def transform(self, X, y=None):
130130
-------
131131
X_new : numpy array of shape [n_samples, n_components]
132132
"""
133-
X = atleast2d_or_csr(X)
133+
X = check_array(X)
134134

135135
if (self.components_ is None):
136136
raise ValueError('No components initialized')

0 commit comments

Comments
 (0)