# \#numeric-primitives

**URL:** https://discourse.julialang.org/tag/numeric-primitives/1076.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Function that accepts scalars or one element vectors/ arrays](https://discourse.julialang.org/t/function-that-accepts-scalars-or-one-element-vectors-arrays/84040)

<div class="topic-metadata">

**Author:** [@ellocco](https://discourse.julialang.org/u/ellocco)\
**Replies:** 9\
**Last updated:** [July 13, 2022, 12:23pm UTC](https://discourse.julialang.org/t/function-that-accepts-scalars-or-one-element-vectors-arrays/84040 "2022-07-13T12:23:19Z")

</div>

I would like to restrict a function to accept only argument values which contain only one number, how can this be achieved? My example below accept already scalars, vectors and arrays, but the argument value is not restr…
