Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 4e39c59c authored by hhakim's avatar hhakim
Browse files

Make the Faust-by-vector multiplication return a 1D vector as numpy does...

Make the Faust-by-vector multiplication return a 1D vector as numpy does (instead of a matrix with a dimension size at 1).

Undo the conversion of the result into a numpy.matrix added by commit 421e8251 because it makes impossible to squeeze the 2nd dimension of the vector (a numpy.matrix has necessarily two dimensions).

This commit fixes the error demonstrated in issue #56 (with pyunlocbox).
parent 351380c6
Branches
Tags
No related merge requests found
......@@ -393,14 +393,15 @@ cdef class FaustCore:
else:
self.core_faust_cplx.multiply(&yview_cplx[0,0], nbrow_y,
nbcol_y, &xview_1D_cplx[0], nbrow_x,nbcol_x)
y = np.squeeze(y) # we want a single dim. (but we created two
# above)
else:
if(self._isReal):
self.core_faust_dbl.multiply(&yview[0,0],nbrow_y,nbcol_y,&xview_2D[0,0],nbrow_x,nbcol_x)
else:
self.core_faust_cplx.multiply(&yview_cplx[0,0],nbrow_y,nbcol_y,&xview_2D_cplx[0,0],nbrow_x,nbcol_x)
return np.matrix(y, copy=False)
return y
# print information about the faust (size, number of factor, type of factor (dense/sparse) ...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment