Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect initialization of LDWORK in sb03md #165

Closed
artpelling opened this issue Jan 5, 2022 · 0 comments · Fixed by #166
Closed

Incorrect initialization of LDWORK in sb03md #165

artpelling opened this issue Jan 5, 2022 · 0 comments · Fixed by #166

Comments

@artpelling
Copy link

According to the SLICOT documentation for LDWORK of SB03MD:

 LDWORK  INTEGER
          The length of the array DWORK.  LDWORK >= 1, and
          If JOB = 'X' then
             If FACT = 'F', LDWORK >= N*N,           for DICO = 'C';
                            LDWORK >= MAX(N*N, 2*N), for DICO = 'D';
             If FACT = 'N', LDWORK >= MAX(N*N, 3*N).
          If JOB = 'S' or JOB = 'B' then
             If FACT = 'F', LDWORK >= 2*N*N,       for DICO = 'C';
                            LDWORK >= 2*N*N + 2*N, for DICO = 'D'.
             If FACT = 'N', LDWORK >= MAX(2*N*N, 3*N), DICO = 'C';
                            LDWORK >= 2*N*N + 2*N, for DICO = 'D'.
          For optimum performance LDWORK should be larger.
[...]

However, LDWORK is set to

Slycot/slycot/synthesis.py

Lines 790 to 791 in 063fed3

if ldwork is None:
ldwork = max(2*n*n, 3*n)

disregarding the values of JOB, FACT and DICO.

Which gives me

slycot.exceptions.SlycotParameterError: The following argument had an illegal value: ldwork

for JOB='B', FACT='N' and DICO='D'

I know that I can set ldwork manually, but IMHO that sort of thing is precisely what the wrapper should do for me :^)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant