# BoundsError when inverting a model with Turing

**URL:** <https://discourse.julialang.org/t/boundserror-when-inverting-a-model-with-turing/74019>\
**Category:** New to Julia\
**Tags:** question, diffeq, turing, arrays\
**Created:** [January 4, 2022, 8:46am UTC](https://discourse.julialang.org/t/boundserror-when-inverting-a-model-with-turing/74019 "2022-01-04T08:46:42Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![spinystellate](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@spinystellate](https://discourse.julialang.org/u/spinystellate)\
**Post date:** [January 4, 2022, 3:03pm UTC](https://discourse.julialang.org/t/boundserror-when-inverting-a-model-with-turing/74019/2 "2022-01-04T15:03:58Z")

</div>

Ok, the following converts the data to a Vector{Matrix{Float64}} of size (12000,):

```julia
d = [hcat(c[:]) for c in eachrow(data)]
d[:,1] ~ Normal(predicted[:,1]) 
d[:,2] ~ Normal(predicted[:,2])

```

but this was not the solution after all - I still get the same BoundsError in the same place.

Any suggestions of what else may be wrong with my code/approach would be very welcome.

---

_[View the full topic](https://discourse.julialang.org/t/boundserror-when-inverting-a-model-with-turing/74019)._
