Skip to content

Commit 79ef4e2

Browse files
Merge pull request #205 from ArnoStrouwen/sparsity_detection
remove deprecated SparsityDetection
2 parents b0ae31f + 9b34e50 commit 79ef4e2

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
4141
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
4242
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4343
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
44-
SparsityDetection = "684fba80-ace3-11e9-3d08-3bc7ed6f96df"
4544
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
45+
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
4646
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4747
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
4848

4949
[targets]
50-
test = ["Test", "ArrayInterfaceBandedMatrices", "ArrayInterfaceBlockBandedMatrices", "BandedMatrices", "BlockBandedMatrices", "IterativeSolvers", "Pkg", "Random", "SafeTestsets", "Zygote", "SparsityDetection", "StaticArrays"]
50+
test = ["Test", "ArrayInterfaceBandedMatrices", "ArrayInterfaceBlockBandedMatrices", "BandedMatrices", "BlockBandedMatrices", "IterativeSolvers", "Pkg", "Random", "SafeTestsets", "Symbolics", "Zygote", "StaticArrays"]

test/test_integration.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using SparseDiffTools
2+
using Symbolics
23
using FiniteDiff: finite_difference_jacobian, finite_difference_jacobian!
3-
using SparsityDetection
44

55
using LinearAlgebra, SparseArrays, Test
66

@@ -37,7 +37,7 @@ function second_derivative_stencil(N)
3737
end
3838

3939
output = ones(30); input = ones(30)
40-
sparsity_pattern = sparsity!(f,output,input)
40+
sparsity_pattern = Symbolics.jacobian_sparsity(f,output,input)
4141
true_jac = Float64.(sparse(sparsity_pattern))
4242
colors = matrix_colors(true_jac)
4343
@test colors == repeat(1:3,10)

test/test_sparse_hessian.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Hessian tests
2-
using SparsityDetection, SparseDiffTools
2+
using SparseDiffTools
3+
using Symbolics
34
using ForwardDiff
45
using LinearAlgebra, SparseArrays
56

@@ -8,7 +9,7 @@ function fscalar(x)
89
end
910

1011
x = randn(5)
11-
sparsity = hessian_sparsity(fscalar, x)
12+
sparsity = Symbolics.hessian_sparsity(fscalar, x)
1213
colors = matrix_colors(tril(sparsity))
1314
ncolors = maximum(colors)
1415
D = hcat([float.(i .== colors) for i in 1:ncolors]...)

0 commit comments

Comments
 (0)