Skip to content

Commit 140fe5f

Browse files
zhujch1tansongchen
authored andcommitted
remove dependency SlicedMap
1 parent bebfac2 commit 140fe5f

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
88
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
99
ChainRulesOverloadGeneration = "f51149dc-2911-5acf-81fc-2076a2a81d4f"
1010
IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6"
11-
SliceMap = "82cb661a-3f19-5665-9e27-df437c7e54c8"
1211
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
1312
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
1413
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
@@ -19,7 +18,6 @@ ChainRules = "1"
1918
ChainRulesCore = "1"
2019
ChainRulesOverloadGeneration = "0.1"
2120
IrrationalConstants = "0.2"
22-
SliceMap = "0.2"
2321
SpecialFunctions = "2"
2422
SymbolicUtils = "1"
2523
Symbolics = "5"

src/derivative.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
using SliceMap
32
export derivative
43

54
"""
@@ -56,7 +55,8 @@ end
5655

5756
@inline function derivative(f, x::AbstractMatrix{T}, vN::Val{N}) where {T <: TN, N}
5857
size(x)[1] != 1 && @warn "x is not a row vector."
59-
mapcols(u -> derivative(f, u[1], vN), x)
58+
t = make_taylor.(x, one(N), vN)
59+
return extract_derivative.(f(t), N)
6060
end
6161

6262
@inline function derivative(f, x::AbstractMatrix{T}, l::AbstractVector{S},

0 commit comments

Comments
 (0)