Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2bc667aa authored by hhakim's avatar hhakim
Browse files

Fix issue #101 on pyfaust.Faust mul. by a ndarray of ndim == 1.

parent f7bd1ba8
Branches
Tags
No related merge requests found
......@@ -565,7 +565,7 @@ class Faust:
elif(isinstance(A, float) or isinstance(A, int) or isinstance(A, np.complex)):
raise ValueError("Scalar operands are not allowed, use '*'"
" instead")
elif(isinstance(A, np.ndarray) and isinstance(A[0,0], np.complex)):
elif(isinstance(A, np.ndarray) and A.dtype == np.complex):
j = np.complex(0,1)
return F.m_faust.multiply(A.real).astype(np.complex) + j*F.m_faust.multiply(A.imag)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment