You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the following behavior similar to what was mentioned in this issue. When I apply a rule to a function defined via "@variables" it does not work, while with "@syms" everything is fine. Here is a minimal example:
using Symbolics
@variables a(..)
@syms b(i1, i2)::Real
println("types are the same: ", (a(2, 1) |> typeof) == (b(2, 1) |> typeof)) # prints true
ra = @rule a(~i1, ~i2) => a(~i2, ~i1) where {~i1>~i2}
rb = @rule b(~i1, ~i2) => b(~i2, ~i1) where {~i1>~i2}
println("result of the rule application on a: ", ra(a(2, 1))) # prints nothing
println("result of the rule application on b: ", rb(b(2, 1))) # prints b(1,2)
There is no documentation on pattern matching, so I don't know if this is intended or not.
The text was updated successfully, but these errors were encountered:
What should be unwrapped exactly? I tried ra(Symbolics.unwrap(a(2, 1))). This does not change the result. Also, note that there is the test showing that a(2,1) and b(2,1) are of the same type.
Hi!
I noticed the following behavior similar to what was mentioned in this issue. When I apply a rule to a function defined via "@variables" it does not work, while with "@syms" everything is fine. Here is a minimal example:
There is no documentation on pattern matching, so I don't know if this is intended or not.
The text was updated successfully, but these errors were encountered: