1 parent 00cf01a commit 80739aeCopy full SHA for 80739ae
1 file changed
mkl_fft/_pydfti.pyx
@@ -170,10 +170,9 @@ cdef extern from "src/mklfft.h":
170
171
cdef _raise_dfti_error(int status):
172
"""Raise the exception described by a non-zero MKL DFTI status"""
173
- cdef char * c_error_msg = mkl_dfti_error(status)
174
- cdef bytes py_error_msg = c_error_msg
+ cdef bytes error_msg = mkl_dfti_error(status)
175
176
- message = f"Internal error occurred: {py_error_msg}"
+ message = f"Internal error occurred: {error_msg.decode()}"
177
if status == DFTI_MEMORY_ERROR:
178
raise MemoryError(message)
179
raise ValueError(message)
0 commit comments