From a9187b4fc3359bf32b68c1b2c0a4e3b2ddfcf639 Mon Sep 17 00:00:00 2001 From: Willow Ahrens Date: Tue, 11 Jun 2024 22:53:15 -0400 Subject: [PATCH] fixes #383 --- src/symbolic/simplify.jl | 1 - test/test_interface.jl | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/symbolic/simplify.jl b/src/symbolic/simplify.jl index 3ac1e0a4e..9975a1d92 100644 --- a/src/symbolic/simplify.jl +++ b/src/symbolic/simplify.jl @@ -100,7 +100,6 @@ function get_simplify_rules(alg, shash) (@rule call(ifelse, true, ~a, ~b) => a), (@rule call(ifelse, false, ~a, ~b) => b), (@rule call(ifelse, ~a, ~b, ~b) => b), - (@rule $(literal(-0.0)) => literal(0.0)), (@rule call(norm, ~x::isliteral, ~y) => if iszero(x.val) x end), (@rule block(~a1..., sieve(~c, ~b1), sieve(~c, ~b2), ~a2...) => diff --git a/test/test_interface.jl b/test/test_interface.jl index 5c53f4f82..619891142 100644 --- a/test/test_interface.jl +++ b/test/test_interface.jl @@ -4,6 +4,15 @@ using Finch: AsArray @info "Testing Finch Interface" + #https://github.com/willow-ahrens/Finch.jl/issues/383 + let + A = [0.0 0.0 4.4; 1.1 0.0 0.0; 2.2 0.0 5.5; 3.3 0.0 0.0] + A_fbr = Tensor(Dense(Dense(Element(0.0))), A) + + -A # works + -A_fbr # used to fail + end + @testset "permutedims" begin let io = IOBuffer()