Commit 4b6f55c4 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Merge branch 'issue-131' into 'master'

Fixed issue with numpy.ndarray.resize py37

See merge request !178
parents 18bcb692 27ff571a
Pipeline #33218 passed with stages
in 20 minutes and 1 second
......@@ -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
......
......@@ -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)
......
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