# Rand() doesn't work with dims as tuple of Uint

**URL:** <https://discourse.julialang.org/t/rand-doesnt-work-with-dims-as-tuple-of-uint/112716>\
**Category:** New to Julia\
**Tags:** question, random\
**Created:** [April 9, 2024, 10:09am UTC](https://discourse.julialang.org/t/rand-doesnt-work-with-dims-as-tuple-of-uint/112716 "2024-04-09T10:09:19Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [April 9, 2024, 2:04pm UTC](https://discourse.julialang.org/t/rand-doesnt-work-with-dims-as-tuple-of-uint/112716/4 "2024-04-09T14:04:23Z")

</div>

> [@alex180500](#):
>
> What are the supported types for dims? is it only Int64?

In general, it’s only `Int` (`== Int64` on a 64-bit machine), though a few functions support more general `Integer` arguments and it’s been slowly expanded over time … in particular, _tuples_ of dimensions still have to be `Int`. This was discussed way back in 2014: [accept more Integer types for dims::Int... arguments by stevengj · Pull Request #7956 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/pull/7956) (see also issues that link this).

> [@alex180500](#):
>
> negative dims makes no real sense so using a UInt should be the preferred choice, no?

See [this comment from 2014](https://groups.google.com/g/julia-users/c/RX8sFQHvEV4/m/ttxfYufL7WUJ) by @StefanKarpinski and this discourse discussion: [Why `Int` instead of `UInt` for indexing?](https://discourse.julialang.org/t/why-int-instead-of-uint-for-indexing/63589)

---

_[View the full topic](https://discourse.julialang.org/t/rand-doesnt-work-with-dims-as-tuple-of-uint/112716)._
