Skip to content

Commit

Permalink
fix tensorcast issue
Browse files Browse the repository at this point in the history
  • Loading branch information
stecrotti committed Apr 15, 2024
1 parent bbc8d5b commit 2a5147d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/UniformTensorTrains/UniformTensorTrains.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using ..TensorTrains: _reshape1

using LinearAlgebra
using KrylovKit: eigsolve
using TensorCast: TensorCast, @cast
using Tullio: @tullio

export AbstractPeriodicTensorTrain, PeriodicTensorTrain, flat_periodic_tt, rand_periodic_tt,
Expand Down
3 changes: 1 addition & 2 deletions src/UniformTensorTrains/transfer_operator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ end

function leading_eig(G::AbstractTransferOperator)
GG = collect(G)
# @cast B[(i,j),(k,l)] := GG[i,j,k,l]
B = reshape(GG, prod(size(GG)[1:2]), prod(size(GG)[3:4]))
@cast B[(i,j),(k,l)] := GG[i,j,k,l]
valsR, vecsR = eigsolve(B)
valsL, vecsL = eigsolve(B')
valsR[1] valsL[1] || @warn "Leading eigenvalue for A and Aᵀ not equal, got $(valsR[1]) and $(valsL[1])"
Expand Down

0 comments on commit 2a5147d

Please sign in to comment.