'Aux. function to make parallel predictions/transformation.'

def _transform(self, X, method):

    self._check_Xy(X)
    method = _check_method(self.base_estimator, method)
    if (X.shape[(-1)] != len(self.estimators_)):
        raise ValueError('The    number    of    estimators    does    not    match    X.shape[-1]')
    (parallel, p_func, n_jobs) = parallel_func(_sl_transform, self.n_jobs)
    n_jobs = min(n_jobs, X.shape[(-1)])
    X_splits = np.array_split(X, n_jobs, axis=(-1))
    est_splits = np.array_split(self.estimators_, n_jobs)
    y_pred = parallel((p_func(est, x, method) for (est, x) in zip(est_splits, X_splits)))
    y_pred = np.concatenate(y_pred, axis=1)
    return y_pred
