# Grid Representation in Interpolations.jl

**URL:** https://discourse.julialang.org/t/grid-representation-in-interpolations-jl/6261
**Category:** General Usage
**Tags:** question
**Created:** [October 5, 2017, 10:29am UTC](https://discourse.julialang.org/t/grid-representation-in-interpolations-jl/6261 "2017-10-05T10:29:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Andrew\_Gibb](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Andrew\_Gibb](https://discourse.julialang.org/u/Andrew_Gibb)
#### Post date: [October 5, 2017, 10:29am UTC](https://discourse.julialang.org/t/grid-representation-in-interpolations-jl/6261/1 "2017-10-05T10:29:59Z")

</div>

Am I missing something here, or is this a bug?

```julia
using Interpolations
xs = 1:10
data = xs.^2
itp1 = interpolate(data, BSpline(Linear()), OnGrid())
itp2 = interpolate(data, BSpline(Linear()), OnCell())
itp1[5]-itp2[5], itp1[5.5] - itp2[5.5]

```

returns (0.0,0.0)  
I expect these two to behave differently. `itp1` should place the values on `1, 2, 3...` and `itp2` should have them on `1.5, 2.5, 3.5...`. Since the function isn’t linear, and the interpolation is, there should be some discrepancy between the interpolated values.
