# How to convert Array{Array{Float64,2},1} to Array{Array{Float16,2},1}

**URL:** <https://discourse.julialang.org/t/how-to-convert-array-array-float64-2-1-to-array-array-float16-2-1/57032>\
**Category:** Data\
**Tags:** question, arrays, convert\
**Created:** [March 12, 2021, 5:06pm UTC](https://discourse.julialang.org/t/how-to-convert-array-array-float64-2-1-to-array-array-float16-2-1/57032 "2021-03-12T17:06:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shazman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shazman/32/23093_2.png) [@Shazman](https://discourse.julialang.org/u/Shazman)\
**Post date:** [March 12, 2021, 5:06pm UTC](https://discourse.julialang.org/t/how-to-convert-array-array-float64-2-1-to-array-array-float16-2-1/57032/1 "2021-03-12T17:06:54Z")

</div>

I am trying to convet an Array then got this error, how can I fix it ?

> typeof(MME)

Array{Array{Float64,2},1}

> mme = convert(Array{Float16},MME)

ERROR: MethodError: Cannot `convert` an object of type Array{Float64,2} to an object of type Float16

thank you in advance

---

<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:** [March 12, 2021, 5:12pm UTC](https://discourse.julialang.org/t/how-to-convert-array-array-float64-2-1-to-array-array-float16-2-1/57032/2 "2021-03-12T17:12:38Z")

</div>

> [@Shazman](#):
>
> mme = convert(Array{Float16},MME)

This is the wrong type — you aren’t trying to convert `MME` to `Array{Float16}`, but rather you are trying to convert its _elements_ to this type.

If you want to call `convert` like this, you need to apply it [elementwise](https://docs.julialang.org/en/v1/manual/functions/#man-vectorized):

```julia
convert.(Array{Float16}, MME)

```

You can also use:

```julia
Array{Array{Float16,2},1}(MME)

```

or

```julia
convert(Array{Array{Float16,2},1}, MME)

```
