# DataInterpolations -- add information after interpolation function has been created?

**URL:** <https://discourse.julialang.org/t/datainterpolations-add-information-after-interpolation-function-has-been-created/50226>\
**Category:** General Usage\
**Created:** [November 16, 2020, 1:28pm UTC](https://discourse.julialang.org/t/datainterpolations-add-information-after-interpolation-function-has-been-created/50226 "2020-11-16T13:28:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [November 16, 2020, 1:28pm UTC](https://discourse.julialang.org/t/datainterpolations-add-information-after-interpolation-function-has-been-created/50226/1 "2020-11-16T13:28:00Z")

</div>

With package `DataInterpolations` – is it possible to _add_ data after I have created an interpolation function? Example:

```julia
u = [1,2,3,4,5]
t = [0,0.5,1,2,4]
f = ConstantInterpolation(u,t)

```

Suppose I pass function `f` to some function, and then want to _add_ a data point to `f` when `u` and `t` are not available.

**Question** : Can I _extract_`u` and `t` from `f`, add the data point to the extracted `u` and `t`, and construct the _new_ interpolation function?

Something like:

```julia
u,t = extract(f)
push!(u,2)
push!(t,8)
f = ConstantInterpolation(u,t)

```

[I looked for fieldnames in `f`, without success…]

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [November 16, 2020, 2:32pm UTC](https://discourse.julialang.org/t/datainterpolations-add-information-after-interpolation-function-has-been-created/50226/2 "2020-11-16T14:32:56Z")

</div>

> [@BLI](#):
>
> With package `DataInterpolations` – is it possible to _add_ data after I have created an interpolation function? Example:

Open an issue. There’s no way to do it right now.
