Skip to content

Support for qr factorizations #545

Open
@kmp5VT

Description

@kmp5VT

Hello,

I am trying to convert the output packed Q output of the QR decomposition of a JLArray back into a JLArray but there is a constructor error being thrown.

 julia> using JLArrays, LinearAlgebra
 julia> A = JLArray(randn(8,4))
 julia> Q,R = qr(A)
 julia> convert(typeof(A), Q)
 ERROR: MethodError: no method matching JLArray{Float64, 2}(::LinearAlgebra.QRCompactWYQ{Float64, JLArray{Float64, 2}, 
 JLArray{Float64, 2}})
 
 Closest candidates are:
  JLArray{T, N}(::UndefInitializer, ::Tuple{Vararg{Int64, N}}) where {T, N}
   @ JLArrays ~/.julia/packages/JLArrays/hD5YX/src/JLArrays.jl:168
  JLArray{T, N}(::UndefInitializer, ::Tuple{Vararg{Integer, N}}) where {T, N}
   @ JLArrays ~/.julia/packages/JLArrays/hD5YX/src/JLArrays.jl:207
  JLArray{T, N}(::UndefInitializer, Integer...) where {T, N}
   @ JLArrays ~/.julia/packages/JLArrays/hD5YX/src/JLArrays.jl:209
  ...

Stacktrace:
 [1] convert(::Type{JLArray{Float64, 2}}, Q::LinearAlgebra.QRCompactWYQ{Float64, JLArray{Float64, 2}, JLArray{Float64, 2}})
   @ LinearAlgebra ~/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/LinearAlgebra/src/abstractq.jl:49
 [2] top-level scope
   @ ~/.julia/dev/testing.jl:187

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions