We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exp(A::AbstractMatrix)
The method exp(A::AbstractMatrix) is too limited and doesn't support most of the lazy types:
julia> using InfiniteArrays julia> a = cache(Ones(∞, ∞)); a[1, 1] = 0; b = view(a, 1:5, 1:5); julia> typeof(b) SubArray{Float64, 2, LazyArrays.CachedArray{Float64, 2, Matrix{Float64}, Ones{Float64, 2, Tuple{InfiniteArrays.OneToInf{Int64}, InfiniteArrays.OneToInf{Int64}}}}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false} julia> exp(b) ERROR: MethodError: no method matching exp(::SubArray{Float64, 2, LazyArrays.CachedArray{Float64, 2, Matrix{Float64}, Ones{Float64, 2, Tuple{InfiniteArrays.OneToInf{Int64}, InfiniteArrays.OneToInf{Int64}}}}, Tuple{UnitRange{Int64}, UnitRange{Int64}}, false}) Closest candidates are: exp(::Union{Float16, Float32, Float64}) at /usr/share/julia/base/special/exp.jl:296 exp(::StridedMatrix{var"#s859"} where var"#s859"<:Union{Float32, Float64, ComplexF32, ComplexF64}) at /usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:560 exp(::StridedMatrix{var"#s859"} where var"#s859"<:Union{Integer, Complex{<:Integer}}) at /usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:561 ... Stacktrace: [1] top-level scope @ REPL[4]:1
or
julia> exp(.√(Diagonal(0:∞)[:, 2:end])) ERROR: MethodError: no method matching exp(::LazyArrays.BroadcastMatrix{Float64, typeof(sqrt), Tuple{SubArray{Int64, 2, Diagonal{Int64, InfiniteArrays.InfUnitRange{Int64}}, Tuple{Base.Slice{InfiniteArrays.OneToInf{Int64}}, InfiniteArrays.InfUnitRange{Int64}}, false}}}) Closest candidates are: exp(::Union{Float16, Float32, Float64}) at /usr/share/julia/base/special/exp.jl:296 exp(::StridedMatrix{var"#s859"} where var"#s859"<:Union{Float32, Float64, ComplexF32, ComplexF64}) at /usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:560 exp(::StridedMatrix{var"#s859"} where var"#s859"<:Union{Integer, Complex{<:Integer}}) at /usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:561 ... Stacktrace: [1] top-level scope @ REPL[19]:1 julia> exp(5exp(3im) * (.√(Diagonal(0:∞)[:, 2:end]))^2) ERROR: MethodError: no method matching exp(::LazyArrays.ApplyArray{ComplexF64, 2, typeof(*), Tuple{LazyArrays.BroadcastMatrix{ComplexF64, typeof(*), Tuple{ComplexF64, LazyArrays.BroadcastMatrix{Float64, typeof(sqrt), Tuple{SubArray{Int64, 2, Diagonal{Int64, InfiniteArrays.InfUnitRange{Int64}}, Tuple{Base.Slice{InfiniteArrays.OneToInf{Int64}}, InfiniteArrays.InfUnitRange{Int64}}, false}}}}}, LazyArrays.BroadcastMatrix{Float64, typeof(sqrt), Tuple{SubArray{Int64, 2, Diagonal{Int64, InfiniteArrays.InfUnitRange{Int64}}, Tuple{Base.Slice{InfiniteArrays.OneToInf{Int64}}, InfiniteArrays.InfUnitRange{Int64}}, false}}}}}) Closest candidates are: exp(::Union{Float16, Float32, Float64}) at /usr/share/julia/base/special/exp.jl:296 exp(::StridedMatrix{var"#s859"} where var"#s859"<:Union{Float32, Float64, ComplexF32, ComplexF64}) at /usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:560 exp(::StridedMatrix{var"#s859"} where var"#s859"<:Union{Integer, Complex{<:Integer}}) at /usr/share/julia/stdlib/v1.7/LinearAlgebra/src/dense.jl:561 ... Stacktrace: [1] top-level scope @ REPL[23]:1
The text was updated successfully, but these errors were encountered:
How do you propose to calculate the entries of a non-diagonal matrix exponential?
Sorry, something went wrong.
Sorry, I accidentally closed the issue. Just reopened.
As the exp function implemented in the Base, it tries to calculate the Taylor expansion series.
exp
Base
Is it possible to have a lazy implementation of that?
No branches or pull requests
The method
exp(A::AbstractMatrix)
is too limited and doesn't support most of the lazy types:or
The text was updated successfully, but these errors were encountered: