Commit 49eaeff1 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Fixing linearize

parent 6e69df75
......@@ -227,7 +227,10 @@ class SampleMixin(BaseEstimator):
# Transform either samples or samplesets
if isinstance(samples[0], Sample) or isinstance(samples[0], DelayedSample):
kwargs = _make_kwargs_from_samples(samples, self.transform_extra_arguments)
features = super().transform([s.data for s in samples], **kwargs)
features = []
for s in samples:
features.append(super().transform(s.data, **kwargs))
new_samples = [Sample(data, parent=s) for data, s in zip(features, samples)]
return new_samples
elif isinstance(samples[0], SampleSet):
......
......@@ -10,7 +10,7 @@ import numpy as np
def linearize(X):
X = np.asarray(X)
return np.reshape(X, (X.shape[0], -1))
return np.reshape(X, (-1))
class Linearize(FunctionTransformer):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment