# Broadcast inside of \`@mtkmodel\` macro causes precompilation failures when put into a package

**URL:** <https://discourse.julialang.org/t/broadcast-inside-of-mtkmodel-macro-causes-precompilation-failures-when-put-into-a-package/107277>\
**Category:** General Usage\
**Tags:** question, modelingtoolkit\
**Created:** [December 7, 2023, 3:06pm UTC](https://discourse.julialang.org/t/broadcast-inside-of-mtkmodel-macro-causes-precompilation-failures-when-put-into-a-package/107277 "2023-12-07T15:06:39Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [December 15, 2023, 1:42pm UTC](https://discourse.julialang.org/t/broadcast-inside-of-mtkmodel-macro-causes-precompilation-failures-when-put-into-a-package/107277/20 "2023-12-15T13:42:25Z")

</div>

Ok, thanks for the advice.

So I guess somethign like

```julia
initial_conditions = reduce(vcat,[collect(mass.s .=> [0.0, 1.0, 1.0]), collect(mass.v .=> [1.0, 1.0, 0.0])])

```

is the way to go isn’t it ? When multiple vectors have first to be collected, then gathered together through `reduce`

EDIT : This was actually brought up in [2D arrays with ModelingToolkit - #7 by baggepinnen](https://discourse.julialang.org/t/2d-arrays-with-modelingtoolkit/107448/7)

---

_[View the full topic](https://discourse.julialang.org/t/broadcast-inside-of-mtkmodel-macro-causes-precompilation-failures-when-put-into-a-package/107277)._
