# 2D static array

**URL:** <https://discourse.julialang.org/t/2d-static-array/95414>\
**Category:** General Usage\
**Tags:** diffeq, staticarrays\
**Created:** [March 1, 2023, 10:26pm UTC](https://discourse.julialang.org/t/2d-static-array/95414 "2023-03-01T22:26:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erlebach/32/12973_2.png) [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Post date:** [March 1, 2023, 10:26pm UTC](https://discourse.julialang.org/t/2d-static-array/95414/1 "2023-03-01T22:26:49Z")

</div>

I have an issue regarding StaticArray dimensionality when using `DifferentialEquations.jl`.  
If I solve a matrix equation using 3x3 StaticArrays, my solver returns a 3x3 array.  
Will that create a problem in the `solve` function? Or does `solve` expect a flattened array? Thanks.

---

<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:** [March 1, 2023, 10:35pm UTC](https://discourse.julialang.org/t/2d-static-array/95414/2 "2023-03-01T22:35:21Z")

</div>

> [@erlebach](#):
>
> Will that create a problem in the `solve` function?

It will throw an error saying that you should return a static array if u0 is a static array.

> [@erlebach](#):
>
> Or does `solve` expect a flattened array?

No, higher dimensional arrays are pretty standard.
