Skip to content

Commit 818e8e7

Browse files
Made ValueError message text carry status value
1 parent 44a4b7a commit 818e8e7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mkl_fft/_pydfti.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def _fft1d_impl(x, n=None, axis=-1, overwrite_arg=False, direction=+1):
302302
status = 1
303303

304304
if status:
305-
raise ValueError("Internal error")
305+
raise ValueError("Internal error, status={}".format(status))
306306

307307
n_max = <long> cnp.PyArray_DIM(x_arr, axis_)
308308
if (n_ < n_max):
@@ -349,7 +349,7 @@ def _fft1d_impl(x, n=None, axis=-1, overwrite_arg=False, direction=+1):
349349
x_arr, n_, <int> axis_, f_arr)
350350

351351
if (status):
352-
raise ValueError("Internal error occurred")
352+
raise ValueError("Internal error occurred, status={}".format(status))
353353

354354
return f_arr
355355

@@ -412,7 +412,7 @@ def _rrfft1d_impl(x, n=None, axis=-1, overwrite_arg=False, direction=+1):
412412
status = 1
413413

414414
if status:
415-
raise ValueError("Internal error")
415+
raise ValueError("Internal error, status={}".format(status))
416416

417417
n_max = <long> cnp.PyArray_DIM(x_arr, axis_)
418418
if (n_ < n_max):
@@ -437,7 +437,7 @@ def _rrfft1d_impl(x, n=None, axis=-1, overwrite_arg=False, direction=+1):
437437
status = float_float_mkl_rfft_out(x_arr, n_, <int> axis_, f_arr)
438438

439439
if (status):
440-
raise ValueError("Internal error occurred")
440+
raise ValueError("Internal error occurred, status={}".format(status))
441441

442442
return f_arr
443443

@@ -491,7 +491,7 @@ def _rc_fft1d_impl(x, n=None, axis=-1, overwrite_arg=False):
491491
status = double_cdouble_mkl_fft1d_out(x_arr, n_, <int> axis_, f_arr, HALF_HARMONICS)
492492

493493
if (status):
494-
raise ValueError("Internal error occurred")
494+
raise ValueError("Internal error occurred, with status={}".format(status))
495495

496496
return f_arr
497497

@@ -567,7 +567,7 @@ def _rc_ifft1d_impl(x, n=None, axis=-1, overwrite_arg=False):
567567
status = cdouble_double_mkl_irfft_out(x_arr, n_, <int> axis_, f_arr)
568568

569569
if (status):
570-
raise ValueError("Internal error occurred")
570+
raise ValueError("Internal error occurred, status={}".format(status))
571571

572572
return f_arr
573573

0 commit comments

Comments
 (0)