# Array size N\*1 Array{type,2} automatically converted to Vector or Array{type, 1}

**URL:** <https://discourse.julialang.org/t/array-size-n-1-array-type-2-automatically-converted-to-vector-or-array-type-1/59140>\
**Category:** New to Julia\
**Tags:** array\
**Created:** [April 12, 2021, 11:39pm UTC](https://discourse.julialang.org/t/array-size-n-1-array-type-2-automatically-converted-to-vector-or-array-type-1/59140 "2021-04-12T23:39:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BMval](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bmval/32/7647_2.png) [@BMval](https://discourse.julialang.org/u/BMval)\
**Post date:** [April 12, 2021, 11:39pm UTC](https://discourse.julialang.org/t/array-size-n-1-array-type-2-automatically-converted-to-vector-or-array-type-1/59140/1 "2021-04-12T23:39:54Z")

</div>

Why array size N\*1 Array{type,2} can’t be automatically converted to Vector or Array{type, 1}. It will be convenient and logical.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [April 13, 2021, 12:06am UTC](https://discourse.julialang.org/t/array-size-n-1-array-type-2-automatically-converted-to-vector-or-array-type-1/59140/2 "2021-04-13T00:06:46Z")

</div>

This would be really bad as it would break type stability. Specifically, it would mean that the type of `Matrix*Matrix` would either be `Vector` or `Matrix` depending on the sizes.

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [April 13, 2021, 12:25am UTC](https://discourse.julialang.org/t/array-size-n-1-array-type-2-automatically-converted-to-vector-or-array-type-1/59140/3 "2021-04-13T00:25:35Z")

</div>

What is the context of your question? Please provide a minimal example.

---

<div class="post-metadata">

**Author:** ![BMval](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bmval/32/7647_2.png) [@BMval](https://discourse.julialang.org/u/BMval)\
**Post date:** [April 13, 2021, 12:49am UTC](https://discourse.julialang.org/t/array-size-n-1-array-type-2-automatically-converted-to-vector-or-array-type-1/59140/4 "2021-04-13T00:49:12Z")

</div>

Yes, you are right. I agree.  
At the same time for a human, vector and N\*1 array is almost the same, so  
df[:,:cl].= (Array{type,2})[:,1] is look strange and unreadable.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [April 13, 2021, 12:52am UTC](https://discourse.julialang.org/t/array-size-n-1-array-type-2-automatically-converted-to-vector-or-array-type-1/59140/5 "2021-04-13T00:52:57Z")

</div>

If it is broadcasting what you want, it will be fixed soon: [One-dimensional matrix and vectors in broadcast](https://discourse.julialang.org/t/one-dimensional-matrix-and-vectors-in-broadcast/56146)
