Skip to content

Commit

Permalink
fixes #383
Browse files Browse the repository at this point in the history
  • Loading branch information
willow-ahrens committed Jun 12, 2024
1 parent ac76c23 commit a9187b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/symbolic/simplify.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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...) =>
Expand Down
9 changes: 9 additions & 0 deletions test/test_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a9187b4

Please sign in to comment.