Skip to content

[ENHANCEMENT] Remove BlockSparseArray{Float64}([2, 3], [2, 3]) constructor #69

Closed
@mtfishman

Description

@mtfishman

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions