I'm attempting to use Julia for some Linear Algebra. The documentation lists a number of functions suitable for working with matrices. Some of these work directly on running Julia e.g.
julia> ones(2,2)
2×2 Array{Float64,2}:
1.0 1.0
1.0 1.0
while others give an UndefVarError
e.g.
julia> eye(2,2)
ERROR: UndefVarError: eye not defined
Stacktrace:
[1] top-level scope at none:0
Why am I only able to access some of the functions listed on the Linear Algebra section? https://michaelhatherly.github.io/julia-docs/en/latest/stdlib/linalg.html#Base.LinAlg.expm
I have also tried importing the LinearAlgebra
package but this doesn't make a difference:
julia> using LinearAlgebra
julia> eye(2,2)
ERROR: UndefVarError: eye not defined
Stacktrace:
[1] top-level scope at none:0
In fact some functions now become available e.g. dot
, whilst others which according to the documentation are also part of the Linear Algebra library continue to give an error:
julia> dot
ERROR: UndefVarError: dot not defined
julia> using LinearAlgebra
julia> dot
dot (generic function with 12 methods)
julia> vecdot
ERROR: UndefVarError: vecdot not defined
Both of the above functions are listed as Base.LinAlg.dot
in the documentation.
The packages I currently have installed are:
(v1.0) pkg> status
Status `~/.julia/environments/v1.0/Project.toml`
[0c46a032] DifferentialEquations v5.3.1
[7073ff75] IJulia v1.13.0
[91a5bcdd] Plots v0.21.0
[37e2e46d] LinearAlgebra
[2f01184e] SparseArrays
This problem occurs for many other functions discussed on the linear algebra page:
julia> repmat([1, 2, 3], 2)
ERROR: UndefVarError: repmat not defined
Stacktrace:
[1] top-level scope at none:0
I have Julia vs1.01 installed
eye
is nowLinearAlgebra.I
. – phipsgabler