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
Add wrapperfor ?pteqr #11224
Comments
Here is the branch that I started for the ?pteqr routine. Something that I encountered when looking at the NAG examples that I questioned was that the NAG page said both d and e are So, should I keep the randomly generated |
Allow it to be complex if it works. |
Try to follow Netlib documentation. NAG has no obligation to be LAPACK compatible and sometimes they have different flavors. That's why they have their own naming convention. Also NAG examples are low precision so if possible make random examples and use the NAG ones for validation. |
@swallan I think you are you referring to the complex values in the example matrix Before calling I wrote above:
That's where the complex data types would actually be used. Based on the NAG examples and documentation, see if you can figure out how tests for |
@mdhaber Yes, I was referring the complex A– I will take a crack at it and see where I can get. |
@swallan I've pushed the wrapper to my branch @mdhaber said that you have been working on these on your own branch, do you have any which are ready/almost ready to go? I can prioritise those, so we can start getting these merged. |
I'm not too picky–they're all mostly written. |
@Kai-Striega
And my reading of the documentation makes me think that z is not an input when |
I think it's still included, it's just not referenced. For the case where
compz=I, z is definitely included as, on return, it contains the
orthonormal eigenvectors of the tridiagonal matrix. Although I agree that
not having to explicitly pass z would be nice.
…On Mon., 24 Feb. 2020, 13:34 Sam Wallan, ***@***.***> wrote:
@Kai-Striega <https://github.com/Kai-Striega>
I'm taking a look at running the tests for this one, and I think that in
the wrapper z cannot depend on n or should accept None since z is not
used in all of the compz values -
If COMPZ = 'N', then Z is not referenced.
And my reading of the documentation makes me think that z is not an input
when compz=I either
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11224?email_source=notifications&email_token=AHFOJNLMXCG7JPREHG7WTXDRENL7NA5CNFSM4J3CLJM2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWVJ5Q#issuecomment-590173430>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHFOJNIXTUNSWAWCTI6SJQDRENL7NANCNFSM4J3CLJMQ>
.
|
Opened a pull request to add the tests for this wrapper. |
@ilayn I'd like to check something with you. The definition of
This means that ldz can be either 1 or n, depending on
OR, moving the check into the definition:
Which works... but looks quite convoluted and error prone. Is there a better way to achieve the same result? |
Ideally if the char is actually acting like a switch we convert it into integers 0 1 2 to make the switch easier and comparisons to be over integers instead of chars. You can find many examples of compute_v, compute_z etc. Here the switch is a boolean like. If compute_z is 0 z is an empty array hence optional. But if not zero it needs a check of being n x n. Same for ldz if 0 ldz=1 or it is n. |
Thanks I'll take a look at compute_z etc. tomorrow morning! |
See NumFOCUS Small Development Grant Proposal 2019 Round 3 proposal for background.
Add wrapper for ?pteqr.
Suggested signature:
Test idea (
compz="N"
):A
. The fact that "a Hermitian strictly diagonally dominant matrix with real positive diagonal entries is positive definite" can be used to generate one. For instance, in the real case, if all the diagonal elements are >2 and the off-diagonals are <1, the matrix will be PD.A
with?pteqr
scipy.linal.eigh
Test idea (
compz="I"
):A
.A
with?pteqr
scipy.linal.eigh
Z
is orthogonal (Z@Z.T
is identity matrix)Z @ diag(d) @ Z.T
is the original matrixA
.I'll come back to tests for
compz="V"
later. Update: see #11224 (comment).Also test for singular matrix, non-spd matrix, and incorrect/incompatible array sizes.
Also: implement all examples from the NAG manual as additional tests.
The text was updated successfully, but these errors were encountered: