Skip to content
New issue

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

Cannot make @heads work #9

Open
mmikhasenko opened this issue Jan 7, 2022 · 0 comments
Open

Cannot make @heads work #9

mmikhasenko opened this issue Jan 7, 2022 · 0 comments

Comments

@mmikhasenko
Copy link

Cannot figure out quickly what's wrong with that

lorenz = TensorIndexType("lorenz","L",4)
@heads [lorenz] pX p3 p1 p2

the first argument is not recognized as AbstractArray{SymbolicTensors.TensorIndexType}. Instead, Julia think that it is Expr...(?):

MethodError: no method matching var"@heads"(::LineNumberNode, ::Module, ::Expr, ::Symbol, ::Symbol, ::Symbol, ::Symbol)

Closest candidates are:

var"@heads"(::LineNumberNode, ::Module, !Matched::AbstractArray{SymbolicTensors.TensorIndexType}, ::Any...) at \.julia\packages\SymbolicTensors\DPYJA\src\tensor.jl:244

#macroexpand#51@expr.jl:115[inlined]
macroexpand@expr.jl:114[inlined]
try_macroexpand(::Module, ::Base.UUID, ::Expr)@PlutoRunner.jl:248
var"#run_expression#25"(::Bool, ::typeof(Main.PlutoRunner.run_expression), ::Module, ::Expr, ::Base.UUID, ::Nothing, ::Nothing)@PlutoRunner.jl:477
top-level scope@none:1

the @head macro looks ok, but different to @indices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant