-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Consider the MWE:
using TensorCast # 0.4.8
r = fill(fill(ones(3), 5), 7)
function f(r)
@cast _[i, j ⊗ k] := r[k].a[j][i]
endIdeally f(r) should give a 3 x 35 matrix, but I get
ERROR: LoadError: unable to infer ranges for indices i
@cast _[i, j ⊗ k] := ((r[k]).a[j])[i]
@ Main REPL[22]:2
Stacktrace:
[1] sizeinfer(store::@NamedTuple{dict::Dict{Any, Any}, assert::Vector{Any}, mustassert::Vector{Any}, seen::Vector{Any}, need::Vector{Any}, top::Vector{Any}, main::Vector{Any}}, call::TensorCast.CallInfo)
@ TensorCast ~/.julia/packages/TensorCast/fctFg/src/macro.jl:1143
[2] findsizes(store::@NamedTuple{dict::Dict{Any, Any}, assert::Vector{Any}, mustassert::Vector{Any}, seen::Vector{Any}, need::Vector{Any}, top::Vector{Any}, main::Vector{Any}}, call::TensorCast.CallInfo)
@ TensorCast ~/.julia/packages/TensorCast/fctFg/src/macro.jl:1092
[3] _macro(exone::Expr, extwo::Nothing, exthree::Nothing; call::TensorCast.CallInfo, dict::Dict{Any, Any})
@ TensorCast ~/.julia/packages/TensorCast/fctFg/src/macro.jl:211
[4] _macro
@ ~/.julia/packages/TensorCast/fctFg/src/macro.jl:154 [inlined]
[5] var"@cast"(__source__::LineNumberNode, __module__::Module, exs::Vararg{Any})
@ TensorCast ~/.julia/packages/TensorCast/fctFg/src/macro.jl:74
in expression starting at REPL[22]:2Is it possible to make this work somehow?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels