# Distributed versions of mapslice

**URL:** https://discourse.julialang.org/t/distributed-versions-of-mapslice/26783
**Category:** General Usage
**Tags:** question
**Created:** [July 25, 2019, 7:37am UTC](https://discourse.julialang.org/t/distributed-versions-of-mapslice/26783 "2019-07-25T07:37:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Charlie\_He](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charlie_he/32/9465_2.png) [@Charlie\_He](https://discourse.julialang.org/u/Charlie_He)
#### Post date: [July 25, 2019, 7:37am UTC](https://discourse.julialang.org/t/distributed-versions-of-mapslice/26783/1 "2019-07-25T07:37:11Z")

</div>

I found julia awfully lacking in terms of operations among/along specific axis/axes of matrix/tensors. It has been extremely annoying that there is no “dims” argument for sum, reduce, mean, prod, etc… The only option for this is mapslice but there is also no parallel version for it. It seems only way around it is just to initialize a SharedArray and do a @distributed for manually, which is just extra syntax.

---

<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: [July 25, 2019, 7:51am UTC](https://discourse.julialang.org/t/distributed-versions-of-mapslice/26783/2 "2019-07-25T07:51:35Z")

</div>

> [@Charlie\_He](#):
>
> It has been extremely annoying that there is no “dims” argument for sum

😕

```julia
julia> sum(ones(3, 3); dims = 1)
1×3 Array{Float64,2}:
 3.0 3.0 3.0

```

You may also find

> **[GitHub - bramtayl/JuliennedArrays.jl: Type stable array slicing](https://github.com/bramtayl/JuliennedArrays.jl/)**
>
> Type stable array slicing. Contribute to bramtayl/JuliennedArrays.jl development by creating an account on GitHub.

In don’t see why it cannot be `pmap`ed, but haven’t tried it myself.
