Skip to content

Commit ffd8c79

Browse files
committed
for the time being, don't restrict to matrix
1 parent 78a9d47 commit ffd8c79

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

stdlib/LinearAlgebra/src/adjtrans.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ julia> Adjoint(A)
3232
9-2im 0+0im
3333
```
3434
"""
35-
struct Adjoint{T,S<:AbstractVecOrMat} <: AbstractMatrix{T}
35+
struct Adjoint{T,S} <: AbstractMatrix{T}
3636
parent::S
3737
end
3838
"""
@@ -59,13 +59,13 @@ julia> Transpose(A)
5959
3 0
6060
```
6161
"""
62-
struct Transpose{T,S<:AbstractVecOrMat} <: AbstractMatrix{T}
62+
struct Transpose{T,S} <: AbstractMatrix{T}
6363
parent::S
6464
end
6565

6666
# basic outer constructors
67-
Adjoint(A::AbstractVecOrMat) = Adjoint{Base.promote_op(adjoint,eltype(A)),typeof(A)}(A)
68-
Transpose(A::AbstractVecOrMat) = Transpose{Base.promote_op(transpose,eltype(A)),typeof(A)}(A)
67+
Adjoint(A) = Adjoint{Base.promote_op(adjoint,eltype(A)),typeof(A)}(A)
68+
Transpose(A) = Transpose{Base.promote_op(transpose,eltype(A)),typeof(A)}(A)
6969

7070
Base.dataids(A::Union{Adjoint, Transpose}) = Base.dataids(A.parent)
7171
Base.unaliascopy(A::Union{Adjoint,Transpose}) = typeof(A)(Base.unaliascopy(A.parent))

stdlib/LinearAlgebra/src/lu.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@ Base.iterate(S::LU, ::Val{:U}) = (S.U, Val(:p))
7272
Base.iterate(S::LU, ::Val{:p}) = (S.p, Val(:done))
7373
Base.iterate(S::LU, ::Val{:done}) = nothing
7474

75-
# LU prefers transpose over adjoint in the real case
7675
adjoint(F::LU) = AdjointFactorization(F)
7776
transpose(F::LU) = TransposeFactorization(F)
78-
# override the generic fallback
77+
# LU prefers transpose over adjoint in the real case, override the generic fallback
7978
transpose(F::LU{<:Real}) = TransposeFactorization(F)
8079

8180
# StridedMatrix

0 commit comments

Comments
 (0)