diff --git a/Project.toml b/Project.toml index 60bfa8c..a21b5e1 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SparseArraysBase" uuid = "0d5efcca-f356-4864-8770-e1ed8d78f208" authors = ["ITensor developers and contributors"] -version = "0.5.0" +version = "0.5.1" [deps] Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" @@ -17,7 +17,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" Accessors = "0.1.41" Aqua = "0.8.9" ArrayLayouts = "1.11.0" -DerivableInterfaces = "0.3.7" +DerivableInterfaces = "0.4" Dictionaries = "0.4.3" FillArrays = "1.13.0" LinearAlgebra = "1.10" diff --git a/src/abstractsparsearray.jl b/src/abstractsparsearray.jl index ecb56bf..35a1bf9 100644 --- a/src/abstractsparsearray.jl +++ b/src/abstractsparsearray.jl @@ -27,6 +27,14 @@ using LinearAlgebra: LinearAlgebra # should go. @derive AnyAbstractSparseArray AbstractArrayOps +using DerivableInterfaces.Concatenate: concatenate +# We overload `Base._cat` instead of `Base.cat` since it +# is friendlier for invalidations/compile times, see +# https://github.com/ITensor/SparseArraysBase.jl/issues/25. +function Base._cat(dims, a::AnyAbstractSparseArray...) + return concatenate(dims, a...) +end + function Base.replace_in_print_matrix( a::AnyAbstractSparseVecOrMat, i::Integer, j::Integer, s::AbstractString ) diff --git a/test/Project.toml b/test/Project.toml index 9b46e23..c8abf0a 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -17,7 +17,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Adapt = "4.2.0" Aqua = "0.8.11" ArrayLayouts = "1.11.1" -DerivableInterfaces = "0.3.17" +DerivableInterfaces = "0.4" Dictionaries = "0.4.4" JLArrays = "0.2.0" LinearAlgebra = "<0.0.1, 1"