From ca87f75cb90b156a6ac9e49abc519bfb9c455fb1 Mon Sep 17 00:00:00 2001 From: Sacha Verweij Date: Sat, 26 Nov 2016 11:14:21 -0800 Subject: [PATCH] Add test for issue #18974 (incorrect eltype from broadcast over a sparse matrix) from closed PR #18975 that was missed in PR #19065. --- test/sparse/sparse.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/sparse/sparse.jl b/test/sparse/sparse.jl index 46e1985e9ce48..1dcd5cbcaa890 100644 --- a/test/sparse/sparse.jl +++ b/test/sparse/sparse.jl @@ -1687,3 +1687,7 @@ let end 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