Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit 8ac6dbc

Browse files
Merge pull request #84 from dlfivefifty/patch-1
Fix for new BlockBandedMatrices
2 parents cdd802f + 67977f2 commit 8ac6dbc

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ Adapt = "1"
2222
ArrayInterface = "1.1, 2.0"
2323
Compat = "2.2, 3"
2424
DataStructures = "0.17"
25-
DiffEqDiffTools = "1.3"
25+
DiffEqDiffTools = "1.7"
2626
ForwardDiff = "0.10"
2727
LightGraphs = "1.3"
2828
Requires = "0.5, 1.0"
2929
VertexSafeGraphs = "0.1"
30-
julia = "1"
30+
julia = "1.2"
3131

3232
[extras]
3333
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"

test/test_ad.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function f(out, x)
215215
return vec(out)
216216
end
217217
x = rand(10000)
218-
J = BandedBlockBandedMatrix(Ones(10000, 10000), (fill(100, 100), fill(100, 100)), (1, 1), (1, 1))
218+
J = BandedBlockBandedMatrix(Ones(10000, 10000), fill(100, 100), fill(100, 100), (1, 1), (1, 1))
219219
Jsparse = sparse(J)
220220
colors = matrix_colors(J)
221221
forwarddiff_color_jacobian!(J, f, x, colorvec=colors)

test/test_specialmatrices.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ tridiagonal=Tridiagonal(dense)
1515
symtridiagonal=SymTridiagonal(dense)
1616

1717
banded=BandedMatrix(dense,(1,2))
18-
blockbanded1=BlockBandedMatrix(dense,([1,2,3,4],[4,3,2,1]),(1,0))
19-
blockbanded2=BlockBandedMatrix(dense,([4,3,2,1],[1,2,3,4]),(1,1))
20-
bandedblockbanded1=BandedBlockBandedMatrix(dense,([1,2,3,4],[4,3,2,1]),(1,0),(1,1))
21-
bandedblockbanded2=BandedBlockBandedMatrix(dense,([4,3,2,1],[1,2,3,4]),(1,1),(1,0))
22-
bandedblockbanded3 = BandedBlockBandedMatrix(Zeros(2 * 4 , 2 * 4), ([4, 4] ,[4, 4]), (1, 1), (1, 1))
18+
blockbanded1=BlockBandedMatrix(dense,[1,2,3,4],[4,3,2,1],(1,0))
19+
blockbanded2=BlockBandedMatrix(dense,[4,3,2,1],[1,2,3,4],(1,1))
20+
bandedblockbanded1=BandedBlockBandedMatrix(dense,[1,2,3,4],[4,3,2,1],(1,0),(1,1))
21+
bandedblockbanded2=BandedBlockBandedMatrix(dense,[4,3,2,1],[1,2,3,4],(1,1),(1,0))
22+
bandedblockbanded3 = BandedBlockBandedMatrix(Zeros(2 * 4 , 2 * 4), [4, 4] ,[4, 4], (1, 1), (1, 1))
2323

2424
@test matrix_colors(dense)==1:n
2525
@test matrix_colors(uptri)==1:n
@@ -42,7 +42,7 @@ function _testvalidity(A)
4242
colorvec=matrix_colors(A)
4343
ncolor=maximum(colorvec)
4444
for colorvec in 1:ncolor
45-
subA=A[:,findall(x->x==colorvec,colorvec)]
45+
subA=Array(A)[:,findall(x->x==colorvec,colorvec)]
4646
@test maximum(sum(subA,dims=2))<=1.0
4747
end
4848
end

0 commit comments

Comments
 (0)