Commit 3230b7f7 authored by Michael Wimmer's avatar Michael Wimmer Committed by Christoph Groth
Browse files

fix bug in Lapack (wrong Exception raised)

parent ba790a06
...@@ -873,6 +873,9 @@ def strsen(np.ndarray[l_logical] select, ...@@ -873,6 +873,9 @@ def strsen(np.ndarray[l_logical] select,
<float *>work.data, &lwork, <float *>work.data, &lwork,
<int *>iwork.data, &liwork, &info) <int *>iwork.data, &liwork, &info)
if info > 0:
raise LinAlgError("Reordering failed; problem is very ill-conditioned")
assert info == 0, "Argument error in strsen" assert info == 0, "Argument error in strsen"
if wi.nonzero()[0].size: if wi.nonzero()[0].size:
...@@ -927,6 +930,9 @@ def dtrsen(np.ndarray[l_logical] select, ...@@ -927,6 +930,9 @@ def dtrsen(np.ndarray[l_logical] select,
<double *>work.data, &lwork, <double *>work.data, &lwork,
<int *>iwork.data, &liwork, &info) <int *>iwork.data, &liwork, &info)
if info > 0:
raise LinAlgError("Reordering failed; problem is very ill-conditioned")
assert info == 0, "Argument error in dtrsen" assert info == 0, "Argument error in dtrsen"
if wi.nonzero()[0].size: if wi.nonzero()[0].size:
...@@ -976,6 +982,9 @@ def ctrsen(np.ndarray[l_logical] select, ...@@ -976,6 +982,9 @@ def ctrsen(np.ndarray[l_logical] select,
<float complex *>w.data, &M, NULL, NULL, <float complex *>w.data, &M, NULL, NULL,
<float complex *>work.data, &lwork, &info) <float complex *>work.data, &lwork, &info)
if info > 0:
raise LinAlgError("Reordering failed; problem is very ill-conditioned")
assert info == 0, "Argument error in ctrsen" assert info == 0, "Argument error in ctrsen"
return filter_args((True, Q is not None, calc_ev), (T, Q, w)) return filter_args((True, Q is not None, calc_ev), (T, Q, w))
...@@ -1020,6 +1029,9 @@ def ztrsen(np.ndarray[l_logical] select, ...@@ -1020,6 +1029,9 @@ def ztrsen(np.ndarray[l_logical] select,
<double complex *>w.data, &M, NULL, NULL, <double complex *>w.data, &M, NULL, NULL,
<double complex *>work.data, &lwork, &info) <double complex *>work.data, &lwork, &info)
if info > 0:
raise LinAlgError("Reordering failed; problem is very ill-conditioned")
assert info == 0, "Argument error in ztrsen" assert info == 0, "Argument error in ztrsen"
return filter_args((True, Q is not None, calc_ev), (T, Q, w)) return filter_args((True, Q is not None, calc_ev), (T, Q, w))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment