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

Allow exponentiation of Diagonal{*Range} #40991

Merged
merged 2 commits into from
May 31, 2021
Merged

Allow exponentiation of Diagonal{*Range} #40991

merged 2 commits into from
May 31, 2021

Conversation

dkarrasch
Copy link
Member

Fixes #40886.

@dkarrasch dkarrasch added the domain:linear algebra Linear algebra label May 29, 2021
@dkarrasch
Copy link
Member Author

@mcabbott Would you mind taking a quick look?

Copy link
Contributor

@mcabbott mcabbott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me, the original issue for Diagonal(1:3)^2 was within power_by_squaring, but it seems better to catch this earlier and never go there.

Things like Diagonal(1:3)^4.5 already had a special path, but this seems cleaner.

stdlib/LinearAlgebra/src/diagonal.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/test/diagonal.jl Show resolved Hide resolved
stdlib/LinearAlgebra/test/diagonal.jl Show resolved Hide resolved
@dkarrasch dkarrasch merged commit 1e9be6e into master May 31, 2021
@dkarrasch dkarrasch deleted the dk/diagonal branch May 31, 2021 08:19
shirodkara pushed a commit to shirodkara/julia that referenced this pull request Jun 9, 2021
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exponentiation of Diagonal{*Range} fails
2 participants