# Reshape DistributedArrays

**URL:** <https://discourse.julialang.org/t/reshape-distributedarrays/23622>\
**Category:** Julia at Scale\
**Tags:** parallel\
**Created:** [April 28, 2019, 5:15pm UTC](https://discourse.julialang.org/t/reshape-distributedarrays/23622 "2019-04-28T17:15:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![monty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/monty/32/44234_2.png) [@monty](https://discourse.julialang.org/u/monty)\
**Post date:** [April 28, 2019, 5:15pm UTC](https://discourse.julialang.org/t/reshape-distributedarrays/23622/1 "2019-04-28T17:15:06Z")

</div>

From an existing DistributedArrays

```julia
dr = DistributedArrays.distribute(rand(2,3,4))

```

I want to generate a new DistributedArrays which is flattened version of dr with dimensions 3 x 12 by “vcat” out of the following slices:

```julia
dr[:,1,:]
dr[:,2,:]
dr[:,3,:]

```

What will be the most computationally and memory efficient way to achieve this?

---

<div class="post-metadata">

**Author:** ![monty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/monty/32/44234_2.png) [@monty](https://discourse.julialang.org/u/monty)\
**Post date:** [May 7, 2019, 2:39pm UTC](https://discourse.julialang.org/t/reshape-distributedarrays/23622/2 "2019-05-07T14:39:36Z")

</div>

Any suggestions? Of course for real problems the array will be much bigger than this?! @andreasnoack?!
