From 140fe5fa0fa28287073c90091e3e6b2e35b806fd Mon Sep 17 00:00:00 2001 From: zhujch Date: Wed, 8 Nov 2023 14:25:44 -0500 Subject: [PATCH] remove dependency SlicedMap --- Project.toml | 2 -- src/derivative.jl | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index d7a10b9..4204fcb 100644 --- a/Project.toml +++ b/Project.toml @@ -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" @@ -19,7 +18,6 @@ ChainRules = "1" ChainRulesCore = "1" ChainRulesOverloadGeneration = "0.1" IrrationalConstants = "0.2" -SliceMap = "0.2" SpecialFunctions = "2" SymbolicUtils = "1" Symbolics = "5" diff --git a/src/derivative.jl b/src/derivative.jl index bc11282..62a60c7 100644 --- a/src/derivative.jl +++ b/src/derivative.jl @@ -1,5 +1,4 @@ -using SliceMap export derivative """ @@ -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},