eigen(tranpose(mat))

Shouldn’t this work?

julia> pmat = [ 0.3 0.5 0.2; 0.5 0.3 0.2; 0.5 0.4 0.1]
3×3 Array{Float64,2}:
 0.3  0.5  0.2
 0.5  0.3  0.2
 0.5  0.4  0.1

julia> eigen(transpose(pmat))
ERROR: MethodError: no method matching eigen(::Transpose{Float64,Array{Float64,2}})
Closest candidates are:
  eigen(::AbstractArray{TA,2}, ::AbstractArray{TB,2}) where {TA, TB} at /home/dabrowsa/lang/julia/julia/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/eigen.jl:382
  eigen(::SymTridiagonal{T,V} where V<:AbstractArray{T,1}) where T at /home/dabrowsa/lang/julia/julia/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/tridiag.jl:201
  eigen(::SymTridiagonal{T,V} where V<:AbstractArray{T,1}, ::UnitRange) where T at /home/dabrowsa/lang/julia/julia/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/tridiag.jl:205
  ...
Stacktrace:
 [1] top-level scope at none:0
1 Like

Maybe. You can use

eigen(copy(transpose(pmat)))

to get the Julia v0.6 behaviour.

Yup, that worked, thanks.

Is it normal to have to use copy to circumvent laziness?

copy was chosen as the function to materialize the lazy Transpose and Adjoint wrappers, so yea, sometimes you have to use that since all methods (like eigen in this case) have not been implemented for those wrappers.

1 Like

OK, thanks.