Skip to content

Commit

Permalink
remove toNumContextProc converter
Browse files Browse the repository at this point in the history
It can cause issues in some generic / template contexts.
  • Loading branch information
Vindaar committed Sep 13, 2024
1 parent f425221 commit 6d68162
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/numericalnim/interpolate.nim
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,6 @@ proc toProc*[T](spline: InterpolatorType[T]): InterpolatorProc[T] =
## Returns a proc to evaluate the interpolator.
result = proc(x: float): T = eval(spline, x)

converter toNumContextProc*[T](spline: InterpolatorType[T]): NumContextProc[T, float] =
## Convert interpolator to `NumContextProc`.
result = proc(x: float, ctx: NumContext[T, float]): T = eval(spline, x)

proc derivEval*[T; U](spline: InterpolatorType[T], x: openArray[float], extrap: ExtrapolateKind = Native, extrapValue: U = missing()): seq[T] =
## Evaluates the derivative of an interpolator at all points in `x`.
result = newSeq[T](x.len)
Expand Down

0 comments on commit 6d68162

Please sign in to comment.