Skip to content

Commit e21a0ef

Browse files
committed
Merge main
2 parents a81c106 + 7433652 commit e21a0ef

File tree

4 files changed

+388
-4
lines changed

4 files changed

+388
-4
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ KroneckerArraysTensorProductsExt = "TensorProducts"
2727
[compat]
2828
Adapt = "4.3"
2929
BlockArrays = "1.6"
30-
BlockSparseArrays = "0.9"
30+
BlockSparseArrays = "0.9, 0.10.3"
3131
DerivableInterfaces = "0.5.3"
3232
DiagonalArrays = "0.3.16"
3333
FillArrays = "1.13"
3434
GPUArraysCore = "0.2"
3535
LinearAlgebra = "1.10"
3636
MapBroadcast = "0.1.10"
37-
MatrixAlgebraKit = "0.2"
37+
MatrixAlgebraKit = "0.2, 0.3"
3838
TensorAlgebra = "0.3.10"
3939
TensorProducts = "0.1.7"
4040
julia = "1.10"

ext/KroneckerArraysBlockSparseArraysExt/KroneckerArraysBlockSparseArraysExt.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ function BlockSparseArrays.blockrange(bs::Vector{<:CartesianProduct})
2323
return blockrange(map(cartesianrange, bs))
2424
end
2525

26+
using BlockArrays: BlockArrays, mortar
27+
using BlockSparseArrays: blockrange
28+
using KroneckerArrays: CartesianProductUnitRange
29+
# Makes sure that `mortar` results in a `BlockVector` with the correct
30+
# axes, otherwise the axes would not preserve the Kronecker structure.
31+
# This is helpful when indexing `BlockUnitRange`, for example:
32+
# https://github.com/JuliaArrays/BlockArrays.jl/blob/v1.7.1/src/blockaxis.jl#L540-L547
33+
function BlockArrays.mortar(blocks::AbstractVector{<:CartesianProductUnitRange})
34+
return mortar(blocks, (blockrange(map(Base.axes1, blocks)),))
35+
end
36+
2637
using BlockArrays: AbstractBlockedUnitRange
2738
using BlockSparseArrays: Block, ZeroBlocks, eachblockaxis, mortar_axis
2839
using KroneckerArrays: KroneckerArrays, KroneckerArray, , arg1, arg2, _similar

test/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ TestExtras = "5ed8adda-3752-4e41-b88a-e8b09835ee3a"
2323
Adapt = "4"
2424
Aqua = "0.8"
2525
BlockArrays = "1.6"
26-
BlockSparseArrays = "0.9"
26+
BlockSparseArrays = "0.9, 0.10"
2727
DerivableInterfaces = "0.5"
2828
DiagonalArrays = "0.3.7"
2929
FillArrays = "1"
3030
GPUArraysCore = "0.2"
3131
JLArrays = "0.2"
3232
KroneckerArrays = "0.2"
3333
LinearAlgebra = "1.10"
34-
MatrixAlgebraKit = "0.2"
34+
MatrixAlgebraKit = "0.2, 0.3"
3535
SafeTestsets = "0.1"
3636
StableRNGs = "1.0"
3737
Suppressor = "0.2"

0 commit comments

Comments
 (0)