# How to initialize array of arrays with specific type?

**URL:** <https://discourse.julialang.org/t/how-to-initialize-array-of-arrays-with-specific-type/94557>\
**Category:** General Usage\
**Tags:** type, arrays, interpolations, interpolationsjl\
**Created:** [February 13, 2023, 1:15pm UTC](https://discourse.julialang.org/t/how-to-initialize-array-of-arrays-with-specific-type/94557 "2023-02-13T13:15:58Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 13, 2023, 1:34pm UTC](https://discourse.julialang.org/t/how-to-initialize-array-of-arrays-with-specific-type/94557/6 "2023-02-13T13:34:00Z")

</div>

> [@CeterisPartybus](#):
>
> Normally, I can initialize any array of arrays like this:
> 
> ```julia
> A = fill([], 1, 20)
> 
> ```

Note that this initializes every element to the _same_ empty array. If you want to initialize them to _distinct_ empty arrays you should use a comprehension. See [Initialize array of arrays - #2 by GunnarFarneback](https://discourse.julialang.org/t/initialize-array-of-arrays/11610/2)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-initialize-array-of-arrays-with-specific-type/94557)._
