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