Interpolations.jl icon indicating copy to clipboard operation
Interpolations.jl copied to clipboard

knot iterator?

Open stevengj opened this issue 4 years ago • 0 comments

It would be nice to provide a knots(interpolation) function that returned an iterator over the knot locations, since for a variety of purposed (e.g. numerical integration) it is useful to know where the discontinuities are.

#227 is a much more ambitious approach to exposing knot information, I guess, but doesn't seem incompatible with having a simple knots(...) that returns an iterator.

Implementation could be as simple as:

knots(itp::GriddedInterpolation) = Iterators.flatten(itp.knots)

maybe?

stevengj avatar Dec 09 '19 20:12 stevengj