Closed
Description
Sparse matrix to elementwise power of 0 is incorrect, ref https://github.com/JuliaLang/julia/blob/c93ed16a093e33fe9e0de153120c821959641bd2/base/sparse/sparsematrix.jl#L579
In Julia:
julia> sparse(zeros(2,2)).^0
2x2 sparse matrix with 0 Float64 nonzeros:
In Matlab:
>> sparse(zeros(2,2)).^0
ans =
(1,1) 1
(2,1) 1
(1,2) 1
(2,2) 1
Separate comment, but it would be nice if I got a more descriptive error message (or no error at all) from:
julia> sparse([1 2],[1 2],[1 2])
MethodError(sparse,(
1x2 Array{Int64,2}:
1 2,
1x2 Array{Int64,2}:
1 2,
1x2 Array{Int64,2}:
1 2))
Putting commas or semicolons in fixes things, but that's not particularly obvious to a new user.