# Where is \`OrdinaryDiffEq.ode\_interpolation\`'s output type defined?

**URL:** <https://discourse.julialang.org/t/where-is-ordinarydiffeq-ode-interpolation-s-output-type-defined/64844>\
**Category:** General Usage\
**Tags:** question, package, diffeq\
**Created:** [July 18, 2021, 3:27am UTC](https://discourse.julialang.org/t/where-is-ordinarydiffeq-ode-interpolation-s-output-type-defined/64844 "2021-07-18T03:27:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cadojo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cadojo/32/25328_2.png) [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Post date:** [July 18, 2021, 3:27am UTC](https://discourse.julialang.org/t/where-is-ordinarydiffeq-ode-interpolation-s-output-type-defined/64844/1 "2021-07-18T03:27:28Z")

</div>

I’ve defined my own subtype of `DenseArray` called `CartesianState`. The source code is available [here](https://github.com/cadojo/GeneralAstrodynamics.jl/blob/f91a8546ccac831ad6d50b0b873b0d4b9aee17a7/src/OrbitalStates/StateVectors.jl#L63). The following functionality works…

```julia
state = CartesianState(randn(6))
similar(state)
SymbolicUtils.Code.create_array(::Type{<:CartesianState}, ...)
# others

```

I’d like to use my custom array as a type for `DifferentialEquations` solvers. I can use my new array type to make an `ODEProblem`, and solving the problem returns a valid `ODESolution`.

The `ODESolution` `u` field is a `Vector` of `CartesianState` values – great! But when I interpolate between time steps via `(::ODESolution)(t)`, I get a `Vector{Float64}` back.

I’ve traced this back to `OrdinaryDiffEq.ode_interpolation`, but I can’t figure out where that function’s output type is determined. **Does anyone know offhand?**

---

<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:** [July 18, 2021, 9:56am UTC](https://discourse.julialang.org/t/where-is-ordinarydiffeq-ode-interpolation-s-output-type-defined/64844/2 "2021-07-18T09:56:14Z")

</div>

> [@cadojo](#):
>
> I’ve traced this back to `OrdinaryDiffEq.ode_interpolation` , but I can’t figure out where that function’s output type is determined. **Does anyone know offhand?**

It should just be defined as the result of a broadcast operation:

> <https://github.com/SciML/OrdinaryDiffEq.jl/blob/master/src/dense/generic_dense.jl#L484>
