lib/rumale/decomposition/fast_ica.rb in rumale-0.23.0 vs lib/rumale/decomposition/fast_ica.rb in rumale-0.23.1

- old
+ new

@@ -79,10 +79,10 @@ @mean, whiten_mat = whitening(x, @params[:n_components]) if @params[:whiten] wx = @params[:whiten] ? (x - @mean).dot(whiten_mat.transpose) : x unmixing, @n_iter = ica(wx, @params[:fun], @params[:max_iter], @params[:tol], @rng.dup) @components = @params[:whiten] ? unmixing.dot(whiten_mat) : unmixing - @mixing = Numo::Linalg.pinv(@components) + @mixing = Numo::Linalg.pinv(@components).dup if @params[:n_components] == 1 @components = @components.flatten.dup @mixing = @mixing.flatten.dup end self