Skip to content

Commit

Permalink
Merge pull request #117 from YingboMa/myb/reg
Browse files Browse the repository at this point in the history
Fix register
  • Loading branch information
chriselrod authored Apr 29, 2022
2 parents 447bab1 + 2294c8c commit 1dbd529
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/DataInterpolations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions test/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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))

0 comments on commit 1dbd529

Please sign in to comment.