# Any way to write a 2d array literal with single column, 0.6.0?

**URL:** <https://discourse.julialang.org/t/any-way-to-write-a-2d-array-literal-with-single-column-0-6-0/6069>\
**Category:** General Usage\
**Created:** [September 25, 2017, 5:58pm UTC](https://discourse.julialang.org/t/any-way-to-write-a-2d-array-literal-with-single-column-0-6-0/6069 "2017-09-25T17:58:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kurt\_Franke](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@Kurt\_Franke](https://discourse.julialang.org/u/Kurt_Franke)\
**Post date:** [September 25, 2017, 5:58pm UTC](https://discourse.julialang.org/t/any-way-to-write-a-2d-array-literal-with-single-column-0-6-0/6069/1 "2017-09-25T17:58:29Z")

</div>

Hi, I am just looking at 0.6.0 and am having trouble with some old code.  
I have many places where I pass a literal, single column, 2d array.

It seems that [a ; b], [[a]; [b] ], vcat([3],[5]) all produce 1D arrays. (not clear why that should be, but that’s another discussion…)

In 0.5, I had an ugly workaround using two transposes: [a, b]‘’

In 0.6, the above workaround results in a 1D array.

Is there any way to succinctly write a 2D array literal with a single column, or is there only: reshape( [a,b], 2, 1 ) ?

---

<div class="post-metadata">

**Author:** ![smldis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/smldis/32/1735_2.png) [@smldis](https://discourse.julialang.org/u/smldis)\
**Post date:** [September 25, 2017, 6:36pm UTC](https://discourse.julialang.org/t/any-way-to-write-a-2d-array-literal-with-single-column-0-6-0/6069/2 "2017-09-25T18:36:00Z")

</div>

My trial and error is successful with `[1 2]'`.  
Not sure if there is a cleaner way, for sure you could use the constructor.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [September 25, 2017, 6:42pm UTC](https://discourse.julialang.org/t/any-way-to-write-a-2d-array-literal-with-single-column-0-6-0/6069/3 "2017-09-25T18:42:27Z")

</div>

Related reading: [https://github.com/JuliaLang/julia/pull/23790](https://github.com/JuliaLang/julia/pull/23790)

---

<div class="post-metadata">

**Author:** ![Kurt\_Franke](https://avatars.discourse-cdn.com/v4/letter/k/bc79bd/32.png) [@Kurt\_Franke](https://discourse.julialang.org/u/Kurt_Franke)\
**Post date:** [September 25, 2017, 7:53pm UTC](https://discourse.julialang.org/t/any-way-to-write-a-2d-array-literal-with-single-column-0-6-0/6069/4 "2017-09-25T19:53:46Z")

</div>

Thank you both!
