You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in ITensor/BlockSparseArrays.jl#68, in order to avoid overloading constructors too much, replace constructors like SparseArrayDOK{T}(data::Dict, dims) with SparseArraysBase.sparse(T, data::Dict, dims) (note that won't be an overload of SparseArrays.sparse, but a separate function).
This is in line with how constructors are designed in BlockArrays.jl and SparseArrays.jl, where constructors are (mostly) constrained to be either for initializing arrays with undefined/empty data, or for converting from another array. Functions then generally handle more complicated operations like taking collections of blocks and turning them into block arrays (i.e. BlockArrays.mortar) or taking lists of stored values and constructing a sparse array from those stored values (i.e. SparseArrays.sparse).