JuliaSymbolics/SymbolicUtils.jl

Scheduled broadcast `substitute` is not applied on scalarized tensor

mmikhasenko opened this issue · 0 comments

@variables X[1:2] w
Y = substitute.(X, w => -w)
Y |> Symbolics.scalarize .|> y->substitute(y, Dict(X[1]=>2w, X[2]=>3w))

gives [2w, 3w], while the correct answer is [-2w, -3w].

note, that some mathematical operations work well, like Y = 2X, or Y = X .+ 1