Can not access geqrf!() function in LinearAlgebra Standard Library Package Julia 1.3.0

Trying to run geqrf!() function from the manual

using LinearAlgebra
Q = rand(10, 5); tau = zeros(5)
geqrf!(Q, tau)
# ERROR: UndefVarError: geqrf! not defined

Never mind

LAPACK.gerf!(x, tau) # works

Hmm … but do I import gerf! function without having to always use LAPACK prefix?

geqrf! doesn’t appear to be exported (see https://github.com/JuliaLang/julia/blob/master/stdlib/LinearAlgebra/src/lapack.jl), and if you look at how functions in LAPACK are tested, the LAPACK prefix is used by the developers: https://github.com/JuliaLang/julia/blob/master/stdlib/LinearAlgebra/test/lapack.jl

Alternatively, you can just import LinearAlgebra.LAPACK.geqrf! and then geqrf! is available, without prefix.

4 Likes