Remove Adjoint|Transpose(::UniformScaling) definition #27479
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reading #25461, it looks like that the consensus was that
Adjoint
andTranspose
have to add an extra layer of indirection by wrapping the given object. However,Adjoint(::UniformScaling)
andTranspose(::UniformScaling)
"eagerly execute" adjoint and transpose:julia/stdlib/LinearAlgebra/src/uniformscaling.jl
Lines 66 to 69 in 91d2071
(FYI: those are the added in commit e80697d#diff-2053e27c93f0362bfb456f36c77bb232 during #24969.)
If
Adjoint(::UniformScaling)
andTranspose(::UniformScaling)
are just unnoticed during #25461, I suggest simply removing those lines (hence this PR). When I teststdlib/LinearAlgebra
locally, those definitions were not necessary.Note that, even though
Adjoint{T, UniformScaling{T}}
can be constructed with this PR, I'm not sure if it is necessary to add a special handling. SinceAdjoint <: AbstractMatrix
but notUniformScaling <: AbstractMatrix
, an object of typeAdjoint{T, UniformScaling{T}}
is not well-defined; for example, after this PR, typingAdjoint(I)
in REPL shows error fromBase.show
as would happen with other meaningless combinations likeAdjoint("str")
.