# Reductions along dimension for tuples

**URL:** <https://discourse.julialang.org/t/reductions-along-dimension-for-tuples/5981>\
**Category:** General Usage\
**Created:** [September 19, 2017, 1:59pm UTC](https://discourse.julialang.org/t/reductions-along-dimension-for-tuples/5981 "2017-09-19T13:59:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![morningkyle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/morningkyle/32/1684_2.png) [@morningkyle](https://discourse.julialang.org/u/morningkyle)\
**Post date:** [September 19, 2017, 1:59pm UTC](https://discourse.julialang.org/t/reductions-along-dimension-for-tuples/5981/1 "2017-09-19T13:59:50Z")

</div>

The title suites my report, so I made a reply here. Should I expect an ERROR for the 2nd function call as the 4th? I don’t get the sense of the return value of the 2nd. (Version 0.7.0-DEV.1816 (2017-09-17 15:48 UTC))

```julia
julia> mean([1 2])
1.5

julia> mean([1 2], [3 4])
1×2 Array{Float64,2}:
 1.0 2.0

julia> mean((1, 2))
1.5

julia> mean((1, 2), (3, 4))
ERROR: MethodError: no method matching mean(::Tuple{Int64,Int64}, ::Tuple{Int64,Int64})
Closest candidates are:
  mean(::Union{Function, Type}, ::Any) at statistics.jl:19
  mean(::AbstractArray{T,N} where N, ::Any) where T at statistics.jl:75
  mean(::Any) at statistics.jl:34

```

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [September 19, 2017, 2:19pm UTC](https://discourse.julialang.org/t/reductions-along-dimension-for-tuples/5981/2 "2017-09-19T14:19:16Z")

</div>

`mean([1 2], [3 4])` calls `mean(v[, region])`. See `?mean`.

(and no, this has nothing to do with the original question of this topic)

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [September 19, 2017, 4:55pm UTC](https://discourse.julialang.org/t/reductions-along-dimension-for-tuples/5981/3 "2017-09-19T16:55:16Z")

</div>

> [@Tamas\_Papp](#):
>
> (and no, this has nothing to do with the original question of this topic)

I’ve split this into a new topic.
