# How to convert Array{Int64} to Array{BigInt}

**URL:** <https://discourse.julialang.org/t/how-to-convert-array-int64-to-array-bigint/55473>\
**Category:** General Usage\
**Tags:** question\
**Created:** [February 17, 2021, 4:57pm UTC](https://discourse.julialang.org/t/how-to-convert-array-int64-to-array-bigint/55473 "2021-02-17T16:57:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renan\_Rabelo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/renan_rabelo/32/8048_2.png) [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Post date:** [February 17, 2021, 4:57pm UTC](https://discourse.julialang.org/t/how-to-convert-array-int64-to-array-bigint/55473/1 "2021-02-17T16:57:34Z")

</div>

Is there any function to do it?

---

<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:** [February 17, 2021, 4:58pm UTC](https://discourse.julialang.org/t/how-to-convert-array-int64-to-array-bigint/55473/2 "2021-02-17T16:58:33Z")

</div>

```julia
v=[1,2,3]
BigInt.(v)

```

Broadcasting is your friend here.

---

<div class="post-metadata">

**Author:** ![Renan\_Rabelo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/renan_rabelo/32/8048_2.png) [@Renan\_Rabelo](https://discourse.julialang.org/u/Renan_Rabelo)\
**Post date:** [February 17, 2021, 5:05pm UTC](https://discourse.julialang.org/t/how-to-convert-array-int64-to-array-bigint/55473/3 "2021-02-17T17:05:13Z")

</div>

WOW! What a awesome functionality!

Thanks!

---

<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:** [February 17, 2021, 5:11pm UTC](https://discourse.julialang.org/t/how-to-convert-array-int64-to-array-bigint/55473/4 "2021-02-17T17:11:38Z")

</div>

It’s important to note that broadcasting is generic, ie if I write

```julia
function my_random_function(x)
    ... Do stuff... 
    return blahblahblah
end

```

then `my_random_function.(v)` will just work.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [February 17, 2021, 6:29pm UTC](https://discourse.julialang.org/t/how-to-convert-array-int64-to-array-bigint/55473/5 "2021-02-17T18:29:29Z")

</div>

> [@Oscar\_Smith](#):
>
> `BigInt.(v)`

You can also just write

```julia
big.(v)

```

This will convert `Int` to `BigInt` and floats to `BigFloat`.
