Skip to content

Error in planar contractions with sum #262

@lkdvos

Description

@lkdvos

The following MWE leads to a LoadError, I have not investigated further. It seems to be related to the sum though.

using TensorKit
@planar D[i; j] := A[i; j] + B[i; k] * C[k; j]
ERROR: LoadError: MethodError: no method matching iterate(::Symbol)
The function `iterate` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  iterate(::LazyString)
   @ Base strings/lazy.jl:94
  iterate(::LazyString, ::Integer)
   @ Base strings/lazy.jl:95
  iterate(::Base.EnvDict)
   @ Base env.jl:216
  ...

Stacktrace:
  [1] _construct_braidingtensors!(ex::Any, preargs::Any, indexmap::Any)
    @ TensorKit ~/.julia/packages/TensorKit/9IxV4/src/planar/preprocessors.jl:218
  [2] _construct_braidingtensors(ex::Any)
    @ TensorKit ~/.julia/packages/TensorKit/9IxV4/src/planar/preprocessors.jl:95
  [3] iterate
    @ ./generator.jl:48 [inlined]
  [4] collect_to!(dest::Vector{…}, itr::Base.Generator{…}, offs::Int64, st::Int64)
    @ Base ./array.jl:849
  [5] collect_to_with_first!(dest::Vector{…}, v1::Expr, itr::Base.Generator{…}, st::Int64)
    @ Base ./array.jl:827
  [6] _collect(c::Vector{…}, itr::Base.Generator{…}, ::Base.EltypeUnknown, isz::Base.HasShape{…})
    @ Base ./array.jl:821
  [7] collect_similar(cont::Vector{Any}, itr::Base.Generator{Vector{Any}, typeof(TensorKit._construct_braidingtensors)})
    @ Base ./array.jl:720
  [8] map(f::Function, A::Vector{Any})
    @ Base ./abstractarray.jl:3371
  [9] _construct_braidingtensors(ex::Any)
    @ TensorKit ~/.julia/packages/TensorKit/9IxV4/src/planar/preprocessors.jl:111
 [10] (::TensorOperations.TensorParser)(ex::Expr)
    @ TensorOperations ~/.julia/packages/TensorOperations/RaU9j/src/indexnotation/parser.jl:27
 [11] var"@planar"(__source__::LineNumberNode, __module__::Module, args::Vararg{Expr})
    @ TensorKit ~/.julia/packages/TensorKit/9IxV4/src/planar/macros.jl:9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions