diff --git a/bob/bio/base/algorithm/LDA.py b/bob/bio/base/algorithm/LDA.py index 5bcc21e606b17acf78b79d47024e078f628c768c..26b507e2a8fd3c58e419ab24c2b76574deabb4d8 100644 --- a/bob/bio/base/algorithm/LDA.py +++ b/bob/bio/base/algorithm/LDA.py @@ -180,7 +180,7 @@ class LDA (Algorithm): if self.lda_subspace is not None: self.machine.resize(self.machine.shape[0], self.lda_subspace) self.variances = self.variances.copy() - self.variances.resize(self.lda_subspace) + self.variances = numpy.resize(self.variances, (self.lda_subspace)) if self.pca_subspace is not None: # compute combined PCA/LDA projection matrix diff --git a/bob/bio/base/algorithm/PCA.py b/bob/bio/base/algorithm/PCA.py index d62faf5cafd49235826c234ddf6e47461c4f4fb1..a856292de17232b7af780f07d00b9c780ddf6a8b 100644 --- a/bob/bio/base/algorithm/PCA.py +++ b/bob/bio/base/algorithm/PCA.py @@ -109,7 +109,7 @@ class PCA (Algorithm): logger.info(" ... Keeping %d PCA dimensions", self.subspace_dim) # re-shape machine self.machine.resize(self.machine.shape[0], self.subspace_dim) - self.variances.resize(self.subspace_dim) + self.variances = numpy.resize(self.variances, (self.subspace_dim)) f = bob.io.base.HDF5File(projector_file, "w") f.set("Eigenvalues", self.variances)