Skip to content

Commit

Permalink
Test for kron and bcast minus (#23717)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and fredrikekre committed Oct 3, 2017
1 parent 84c819b commit 522e725
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/sparse/higherorderfns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ end
fY = Array(Y)
# --> test broadcast entry point
@test broadcast(+, X, Y) == sparse(broadcast(+, fX, fY))
@test broadcast(-, X, Y) == sparse(broadcast(-, fX, fY))
@test broadcast(*, X, Y) == sparse(broadcast(*, fX, fY))
@test broadcast(f, X, Y) == sparse(broadcast(f, fX, fY))
# TODO strengthen this test, avoiding dependence on checking whether
Expand Down
3 changes: 3 additions & 0 deletions test/sparse/sparsevector.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,9 @@ let testdims = ((5,10), (20,12), (25,30))
@test Vector(kron(x,y)) == kron(Vector(x), Vector(y))
@test Vector(kron(Vector(x),y)) == kron(Vector(x), Vector(y))
@test Vector(kron(x,Vector(y))) == kron(Vector(x), Vector(y))
# test different types
z = convert(SparseVector{Float16, Int8}, y)
@test Vector(kron(x, z)) == kron(Vector(x), Vector(z))
end
end

Expand Down

0 comments on commit 522e725

Please sign in to comment.