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

real power of a matrix composed of complex numbers #31

Closed
mcartron opened this issue Oct 25, 2022 · 1 comment
Closed

real power of a matrix composed of complex numbers #31

mcartron opened this issue Oct 25, 2022 · 1 comment

Comments

@mcartron
Copy link

mcartron commented Oct 25, 2022

Hello,
I have detected a potential bug with your module.
This code fails :
Matrix.rows([[Complex(1,1), Complex(2,1)], [Complex(3,1), Complex(4,1)]])**0.5
While this two lines of codes correctly run :
Matrix.rows([[1,2], [3,4]])**0.5
Matrix.rows([[Complex(1,1), Complex(2,1)], [Complex(3,1), Complex(4,1)]])**4
Best regards,
Mickael Cartron

@marcandre
Copy link
Member

marcandre commented Oct 25, 2022

Thank you for the report.

You are correct, non-integer powers of Complex matrices will not work 😢. The diagonalisation code is translated directly from JAMA which only supports real matrices inputs, even though it may output complex results.

I have added some words in the documentation to that effect.

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

No branches or pull requests

2 participants