Skip to content

Behavior of iszero(x::Sym) #542

@cvsvensson

Description

@cvsvensson

In SymPy.jl v1.2.1, iszero(x::Sym) returns false. In v2.0.1, it throws ERROR: KeyError: key :boolalg not found.

using SymPy
@syms x 
iszero(x) # returns false in v1, but errors in v2

Is this change intended? One consequence of this is that multiplying variables with sparse matrices also errors in v2.

using SparseArrays, SymPy
@syms x
x * sprand(2,2,0.5) #ERROR: KeyError: key :boolalg not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions