Skip to content

Commit

Permalink
remove dependency SlicedMap
Browse files Browse the repository at this point in the history
  • Loading branch information
zhujch1 authored and tansongchen committed Nov 8, 2023
1 parent bebfac2 commit 140fe5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
ChainRulesOverloadGeneration = "f51149dc-2911-5acf-81fc-2076a2a81d4f"
IrrationalConstants = "92d709cd-6900-40b7-9082-c6be49f344b6"
SliceMap = "82cb661a-3f19-5665-9e27-df437c7e54c8"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
SymbolicUtils = "d1185830-fcd6-423d-90d6-eec64667417b"
Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7"
Expand All @@ -19,7 +18,6 @@ ChainRules = "1"
ChainRulesCore = "1"
ChainRulesOverloadGeneration = "0.1"
IrrationalConstants = "0.2"
SliceMap = "0.2"
SpecialFunctions = "2"
SymbolicUtils = "1"
Symbolics = "5"
Expand Down
4 changes: 2 additions & 2 deletions src/derivative.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

using SliceMap
export derivative

"""
Expand Down Expand Up @@ -56,7 +55,8 @@ end

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

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

0 comments on commit 140fe5f

Please sign in to comment.