SparseArrays.jl icon indicating copy to clipboard operation
SparseArrays.jl copied to clipboard

mismatch of cat and vcat/hcat with sparsearrays and structural zeros

Open eengad opened this issue 5 years ago • 0 comments

using SparseArrays

hcat(spzeros(1, 0), sparsevec([1], [0]))
1×1 SparseMatrixCSC{Float64,Int64} with 1 stored entry:
  [1, 1]  =  0.0

cat(spzeros(1, 0), sparsevec([1], [0]), dims = 2)
1×1 SparseMatrixCSC{Float64,Int64} with 0 stored entries

Julia Version 1.2.0
Commit c6da87ff4b (2019-08-20 00:03 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_HOME = c:/Users/eengad/AppData/Local/Julia-1.1.0/bin

eengad avatar Nov 13 '19 20:11 eengad