Skip to content

Commit

Permalink
Add test for issue JuliaLang#18974 (incorrect eltype from broadcast o…
Browse files Browse the repository at this point in the history
…ver a sparse matrix) from closed PR JuliaLang#18975 that was missed in PR JuliaLang#19065.
  • Loading branch information
Sacha0 committed Nov 27, 2016
1 parent 38736a5 commit 4cf8f62
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/sparse/sparse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1659,3 +1659,7 @@ let X = sparse([1 -1; -1 1])
@test Y / 1 == Y
end
end

# Check that `broadcast` methods specialized for unary operations over
# `SparseMatrixCSC`s determine a reasonable return type. (Issue #18974.)
@test eltype(sin.(spdiagm(Int64(1):Int64(4)))) == Float64

0 comments on commit 4cf8f62

Please sign in to comment.