Closed Sbte closed 3 years ago
Also, it needs to be +1 the actual default value. See also
Well indeed we clearly made a mistake in that wrapper.
Correction: I am surprised that it is actually working. Most settings should have lead to segfaults. I'll fix this
Well apparently, I've opened a can of worms since when I touched these wrappers, linalg.qz
and linalg.ordqz
stopped working. So it will get a bit complicated as a fix.
However, there is basically no way to get a straightforward formula to get the minimal lwork
and liwork
values hence there will be an additional ?tgsen_lwork
functions wrapped to get the right values. Then the regular ?tgsen
call can be requested.
tgsen uses
lwork=max(2*m*(n-m),1)
as default argument (for the complex case) whereinteger intent(out) :: m
. I assume this means that lwork will always be 1, which is usually insufficient. m is the amount of eigenpairs that will be selected (which may be larger than the amount of nonzeros in the select array in the non-complex case).Note that the same issue exists for the non-complex case, but this is less visible, since the default is set to
lwork=max(MAX(4*n+16,2*m*(n-m)),1)
, so this includes4*n+16
.Reproducing code example:
Error message:
Scipy/Numpy/Python version information:
Scipy commit 55cf5c301e58f24092639c01e48c2bd139807906 Numpy 1.19.4 Python 3.8.5