Skip to content

Commit

Permalink
fix size
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch committed Jul 31, 2022
1 parent a8d903f commit b734575
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stdlib/LinearAlgebra/src/qr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,11 @@ convert(::Type{AbstractQ{T}}, Q::QRPackedQ) where {T} = QRPackedQ{T}(Q)
convert(::Type{AbstractQ{T}}, Q::QRCompactWYQ) where {T} = QRCompactWYQ{T}(Q)
convert(::Type{AbstractQ{T}}, adjQ::AdjointQ) where {T} = adjoint(convert(AbstractQ{T}, adjQ.Q))

size(F::Union{QR,QRCompactWY,QRPivoted}) = size(F.factors)
size(F::Union{QR,QRCompactWY,QRPivoted}) = size(getfield(F, :factors))
size(Q::AbstractQ, dim::Integer) = dim in (1, 2) ? size(Q)[dim] : 1
size(Q::Union{QRCompactWYQ,QRPackedQ}) = size(Q.factors, 1), size(Q.factors, 1)
size(Q::Union{QRCompactWYQ,QRPackedQ}, dim::Integer) =
size(Q.factors, dim == 2 ? 1 : dim)
size(Q::Union{QRCompactWYQ,QRPackedQ}) = (n = size(Q.factors, 1); (n, n))
size(adjQ::AdjointQ) = size(adjQ.Q, 2), size(adjQ.Q, 1)
# pseudo-array behaviour, required for indexing with `begin` or `end`
axes(Q::AbstractQ) = map(Base.OneTo, size(Q))
Expand Down

0 comments on commit b734575

Please sign in to comment.