Skip to content

Commit

Permalink
Move SparseArrays to weakdeps
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Jul 13, 2024
1 parent 353cdff commit 72790c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ PrettyTables = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
ReadOnlyArrays = "988b38a3-91fc-5605-94a2-ee2116b3bd83"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[weakdeps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
RegularizationTools = "29dad682-9a27-4bc3-9c72-016788665182"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"

[extensions]
DataInterpolationsChainRulesCoreExt = "ChainRulesCore"
DataInterpolationsChainRulesCoreExt = ["ChainRulesCore", "SparseArrays"]
DataInterpolationsOptimExt = "Optim"
DataInterpolationsRegularizationToolsExt = "RegularizationTools"
DataInterpolationsSymbolicsExt = "Symbolics"
Expand Down
3 changes: 2 additions & 1 deletion ext/DataInterpolationsChainRulesCoreExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ function ChainRulesCore.rrule(::Type{QuadraticSplineParameterCache}, u, t)
n = length(u)

Δt = diff(t)
diagonal_main = [zero(eltype(Δt)), 2 ./ Δt...]
diagonal_main = 2 ./ Δt
pushfirst!(diagonal_main, zero(eltype(diagonal_main)))
diagonal_down = -diagonal_main[2:end]
diagonal_up = zero(diagonal_down)
∂d_∂u = Tridiagonal(diagonal_down, diagonal_main, diagonal_up)
Expand Down
1 change: 0 additions & 1 deletion src/DataInterpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ using LinearAlgebra, RecipesBase
using PrettyTables
using ForwardDiff
using ReadOnlyArrays
using SparseArrays # Only used in DataInterpolationsChainRulesCoreExt.jl, but otherwise Aqua complains
import FindFirstFunctions: searchsortedfirstcorrelated, searchsortedlastcorrelated,
bracketstrictlymontonic

Expand Down

0 comments on commit 72790c8

Please sign in to comment.