Skip to content

Commit

Permalink
for the time being, don't restrict to matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch committed Sep 24, 2022
1 parent 78a9d47 commit d23c892
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions stdlib/LinearAlgebra/src/adjtrans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ julia> Adjoint(A)
9-2im 0+0im
```
"""
struct Adjoint{T,S<:AbstractVecOrMat} <: AbstractMatrix{T}
struct Adjoint{T,S} <: AbstractMatrix{T}
parent::S
end
"""
Expand All @@ -59,7 +59,7 @@ julia> Transpose(A)
3 0
```
"""
struct Transpose{T,S<:AbstractVecOrMat} <: AbstractMatrix{T}
struct Transpose{T,S} <: AbstractMatrix{T}
parent::S
end

Expand Down
3 changes: 1 addition & 2 deletions stdlib/LinearAlgebra/src/lu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ Base.iterate(S::LU, ::Val{:U}) = (S.U, Val(:p))
Base.iterate(S::LU, ::Val{:p}) = (S.p, Val(:done))
Base.iterate(S::LU, ::Val{:done}) = nothing

# LU prefers transpose over adjoint in the real case
adjoint(F::LU) = AdjointFactorization(F)
transpose(F::LU) = TransposeFactorization(F)
# override the generic fallback
# LU prefers transpose over adjoint in the real case, override the generic fallback
transpose(F::LU{<:Real}) = TransposeFactorization(F)

# StridedMatrix
Expand Down

0 comments on commit d23c892

Please sign in to comment.