This doesn't work:
using SparseArrays
m64 = [0 1 2; 3 4 0]
println("m64: $(typeof(m64))")
m32 = SparseMatrixCSC{Int32}(m64)
println("m32: $(typeof(m32))")
v64 = [0 1 2 0]
println("v64: $(typeof(v64))")
v32 = SparseVector{Int32}(v64)
println("v32: $(typeof(v32))")
However this does:
using SparseArrays
m64 = sprand(5, 5, 0.5)
println("m64: $(typeof(m64))")
m32 = SparseMatrixCSC{Float32}(m64)
println("m32: $(typeof(m32))")
v64 = sprand(5, 0.5)
println("v64: $(typeof(v64))")
v32 = SparseVector{Float32}(v64)
println("v32: $(typeof(v32))")
Shouldn't the code above work as well?
This doesn't work:
However this does:
Shouldn't the code above work as well?