-
Notifications
You must be signed in to change notification settings - Fork 168
Error with iszero
for symbolic matrix elements
#372
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
Comments
This isn't just matrices; it's also true of just plain vectors. And it's still a problem on v3.3.1. using Symbolics
@variables a[1:2] b
iszero(b) # Works just fine; returns `false`
iszero(a[1]) # Raises the error Suavesito noted I suspect this has to do with the fact that julia> typeof(a[1].val)
SymbolicUtils.Term{Real, Nothing}
julia> typeof(b.val)
SymbolicUtils.Sym{Real, Base.ImmutableDict{DataType, Any}} Note that |
@Suavesito-Olimpiada A workaround would be to define a = [Symbolics.variable(:a, i, j) for i in 1:N, j in 1:M] for any |
This is fixed. |
Uh oh!
There was an error while loading. Please reload this page.
I got to this when working with symbolic matrices. This is the MWE
The stack-trace is the folowing
Stack Trace
This happens both in Julia-1.7rc4 and Julia-1.6.2, I'm working with
Symbolics v3.3.0
.The text was updated successfully, but these errors were encountered: