# Using vector of vectors for initial guess in TwoPointBVProblem

**URL:** <https://discourse.julialang.org/t/using-vector-of-vectors-for-initial-guess-in-twopointbvproblem/88362>\
**Category:** New to Julia\
**Tags:** diffeq, bvp\
**Created:** [October 6, 2022, 4:49pm UTC](https://discourse.julialang.org/t/using-vector-of-vectors-for-initial-guess-in-twopointbvproblem/88362 "2022-10-06T16:49:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![liamfdoherty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liamfdoherty/32/24516_2.png) [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Post date:** [October 11, 2022, 8:02pm UTC](https://discourse.julialang.org/t/using-vector-of-vectors-for-initial-guess-in-twopointbvproblem/88362/2 "2022-10-11T20:02:30Z")

</div>

Following the stacktrace, the error can be reproduced in the line

```julia
zeros(eltype(sol.u), length(sol.u))

```

and the error appears to be coming from the fact that Julia doesn’t know what to do about making a vector of zeros with a `Vector` element type (maybe because of issues of not having information of size to allocate?). My initial thought would be to use StaticArrays, but in [this post](https://discourse.julialang.org/t/problem-with-differentialequations-staticarrays/39129) @ChrisRackauckas indicates that they aren’t appropriate for ODE solving. Maybe somebody has ideas if there is a way to package the initial guess `sol.u`, maybe as a Matrix instead of as `Vector{Vector{Float64}}` or something similar?

---

_[View the full topic](https://discourse.julialang.org/t/using-vector-of-vectors-for-initial-guess-in-twopointbvproblem/88362)._
