Commit 27ff571a authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Fixed issue with numpy.ndarray.resize py37

parent 18bcb692
Pipeline #33217 passed with stage
in 25 minutes and 37 seconds
......@@ -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