From eb81f66b7ab007d5fcee25abc3d9b92c02e8c4d9 Mon Sep 17 00:00:00 2001 From: Yingbo Ma Date: Fri, 29 Apr 2022 12:31:55 -0400 Subject: [PATCH 1/3] Fix register --- src/DataInterpolations.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DataInterpolations.jl b/src/DataInterpolations.jl index da89a962..b600493c 100644 --- a/src/DataInterpolations.jl +++ b/src/DataInterpolations.jl @@ -36,9 +36,9 @@ ChainRulesCore.frule((_, _, Δt), ::typeof(_interpolate), A::AbstractInterpolati (interp::AbstractInterpolation)(t::Number) = _interpolate(interp, t) -import Symbolics -(interp::DataInterpolations.AbstractInterpolation)(t::Symbolics.Num) = - Symbolics.SymbolicUtils.term(interp,Symbolics.unwrap(t)) +using Symbolics: Num, unwrap, SymbolicUtils +(interp::AbstractInterpolation)(t::Num) = SymbolicUtils.term(interp, unwrap(t)) +SymbolicUtils.promote_symtype(t::AbstractInterpolation, _...) = Real export LinearInterpolation, QuadraticInterpolation, LagrangeInterpolation, AkimaInterpolation, ConstantInterpolation, QuadraticSpline, CubicSpline, From b9f95f834bb7622d0968cba914b399feb888f4ee Mon Sep 17 00:00:00 2001 From: Yingbo Ma Date: Fri, 29 Apr 2022 12:32:02 -0400 Subject: [PATCH 2/3] More test --- test/interface.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/interface.jl b/test/interface.jl index 26165181..ef503448 100644 --- a/test/interface.jl +++ b/test/interface.jl @@ -22,5 +22,5 @@ u = 2.0collect(1:10) t = 1.0collect(1:10) A = LinearInterpolation(u,t) -@variables t -A(t) +@variables t x(t) +substitute(A(t), Dict(t => x)) From 2294c8c7564836c019803620f22ee16c538213bb Mon Sep 17 00:00:00 2001 From: Yingbo Ma Date: Fri, 29 Apr 2022 12:44:42 -0400 Subject: [PATCH 3/3] patch bump --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index a6f4fd3a..34e5c0ba 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "DataInterpolations" uuid = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" -version = "3.9.1" +version = "3.9.2" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"