Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7dd8443b authored by hhakim's avatar hhakim
Browse files

Fix pyx code of polyCoeffs and polyGroupCoeffs: bad dtype of output array if poly dtype is float32.

parent ae492bcb
No related branches found
No related tags found
No related merge requests found
...@@ -689,7 +689,7 @@ cdef class FaustAlgoGen@TYPE_NAME@: ...@@ -689,7 +689,7 @@ cdef class FaustAlgoGen@TYPE_NAME@:
raise dtype_err raise dtype_err
yview = y yview = y
else: else:
y = np.empty((nbrow_y, nbcol_y), dtype='@TYPE@', order='F') y = np.empty((nbrow_y, nbcol_y), dtype=type2dtype('@TYPE@'), order='F')
yview = y yview = y
#void polyCoeffs(int d, int K, int n, const FPP* basisX, const FPP* coeffs, FPP* out) const; #void polyCoeffs(int d, int K, int n, const FPP* basisX, const FPP* coeffs, FPP* out) const;
...@@ -773,7 +773,8 @@ cdef class FaustAlgoGen@TYPE_NAME@: ...@@ -773,7 +773,8 @@ cdef class FaustAlgoGen@TYPE_NAME@:
else: else:
out = [] out = []
for i in range(ncoeffs): for i in range(ncoeffs):
out.append(np.empty((nbrow_y, nbcol_y), dtype='@TYPE@', out.append(np.empty((nbrow_y, nbcol_y),
dtype=type2dtype('@TYPE@'),
order='F')) order='F'))
addr = out[i].__array_interface__['data'][0] addr = out[i].__array_interface__['data'][0]
yview[i] = <@TYPE@*> addr yview[i] = <@TYPE@*> addr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment