Description
Remove the BlockSparseArray{Float64}([2, 3], [2, 3])
constructor. Instead, either undef
should be specified explicitly, i.e. BlockSparseArray{Float64}(undef, [2, 3], [2, 3])
, or we should define a zeros constructor, i.e. blocksparsezeros(Float64, [2, 3], [2, 3])
.
Also note that BlockArrays.jl has both BlockArray{Float64}(undef, [2, 2], [2, 2])
and BlockArray{Float64}(undef_blocks, [2, 2], [2, 2])
which distinguishes between the blocks being allocated with undefined elements vs. the blocks not being allocated yet. Maybe that distinction is relevant for certain block sparse types, or in constructors where you list the block locations (where undef
vs. undef_blocks
could distinguish between the blocks being allocated or not).
See @lkdvos's PR here: ITensor/SparseArraysBase.jl#33 doing the same thing for SparseArraysBase.jl.