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

scalarize does not fully scalarize #1208

Open
YingboMa opened this issue Aug 8, 2024 · 1 comment
Open

scalarize does not fully scalarize #1208

YingboMa opened this issue Aug 8, 2024 · 1 comment

Comments

@YingboMa
Copy link
Member

YingboMa commented Aug 8, 2024

julia> using Symbolics

julia> @variables  pos[1:3]
1-element Vector{Symbolics.Arr{Num, 1}}:
 pos[1:3]

julia> Symbolics.scalarize(pos/norm(pos))
3-element Vector{Num}:
 pos[1] / sqrt(Symbolics._mapreduce(#396, +, pos, Colon(), (:init => false,)))
 pos[2] / sqrt(Symbolics._mapreduce(#396, +, pos, Colon(), (:init => false,)))
 pos[3] / sqrt(Symbolics._mapreduce(#396, +, pos, Colon(), (:init => false,)))

Ref: SciML/ModelingToolkit.jl#2920

@ufechner7
Copy link

Would be nice if this could be fixed.

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

2 participants