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
[ENH] linalg.hessenberg: use orghr #3506
Conversation
Changes Unknown when pulling 8c458a4 on andrenarchy:orghr into * on scipy:master*. |
I'm tempted to just merge this but I'll wait for someone who knows something about fortran. |
integer min_lwork,max_lwork,n,lo,hi | ||
character prefix | ||
c | ||
c Returned maxwrk is acctually optimal lwork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling
For n<=2, the input matrix already is in Hessenberg form. Without seperate treatment, LAPACK returns an error.
callstatement { hi++; lo++; (*f2py_func)(&n,&lo,&hi,a,&n,tau,work,&lwork,&info); } | ||
callprotoargument int*,int*,int*,<ctype2>*,int*,<ctype2>*,<ctype2>*,int*,int* | ||
integer intent(hide),depend(a) :: n = shape(a,0) | ||
<ftype2> dimension(n,n),intent(in,out,copy,out=ht,aligned8),check(shape(a,0)==shape(a,1)) :: a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why forcing alignment here? --- I presume that's what aligned8 attribute does, but I'm not sure.
I'd like to see a test for a small matrix path, and some more tests, esp for complex matrices and weirder orderings (C, F, sliced). EDIT: Had a look at the existing tests. Complex matrices are tested already --- so, it's only 2x2 shortcut which needs an extra test. |
Changes Unknown when pulling 21244a9 on andrenarchy:orghr into * on scipy:master*. |
In any case this needs a rebase now that gh-3871 changed/fixed the lwork calculations. @andrenarchy would you rebase? |
Closing this. Continued in #4490. |
fixes #3502