Skip to content

Commit d227c87

Browse files
authored
Upgrade to DerivableInterfaces v0.4 (#47)
1 parent deb81ae commit d227c87

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Project.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SparseArraysBase"
22
uuid = "0d5efcca-f356-4864-8770-e1ed8d78f208"
33
authors = ["ITensor developers <[email protected]> and contributors"]
4-
version = "0.5.0"
4+
version = "0.5.1"
55

66
[deps]
77
Accessors = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697"
@@ -17,7 +17,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1717
Accessors = "0.1.41"
1818
Aqua = "0.8.9"
1919
ArrayLayouts = "1.11.0"
20-
DerivableInterfaces = "0.3.7"
20+
DerivableInterfaces = "0.4"
2121
Dictionaries = "0.4.3"
2222
FillArrays = "1.13.0"
2323
LinearAlgebra = "1.10"

src/abstractsparsearray.jl

+8
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ using LinearAlgebra: LinearAlgebra
2727
# should go.
2828
@derive AnyAbstractSparseArray AbstractArrayOps
2929

30+
using DerivableInterfaces.Concatenate: concatenate
31+
# We overload `Base._cat` instead of `Base.cat` since it
32+
# is friendlier for invalidations/compile times, see
33+
# https://github.com/ITensor/SparseArraysBase.jl/issues/25.
34+
function Base._cat(dims, a::AnyAbstractSparseArray...)
35+
return concatenate(dims, a...)
36+
end
37+
3038
function Base.replace_in_print_matrix(
3139
a::AnyAbstractSparseVecOrMat, i::Integer, j::Integer, s::AbstractString
3240
)

test/Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1717
Adapt = "4.2.0"
1818
Aqua = "0.8.11"
1919
ArrayLayouts = "1.11.1"
20-
DerivableInterfaces = "0.3.17"
20+
DerivableInterfaces = "0.4"
2121
Dictionaries = "0.4.4"
2222
JLArrays = "0.2.0"
2323
LinearAlgebra = "<0.0.1, 1"

0 commit comments

Comments
 (0)