Hi, I’m converting some Matlab code that I’m not very familiar with to Julia, which I’m also not very familiar with, and I’m tripping over myself.

Assume `X`

is a 5 dimensional float64 array of shape 5x6x41x41x18. The following code in Matlab returns ’`idxs`

which is a 1x6x41x41 array:

```
`[~,idxs] = max(abs(X(1,:,:,:,:)),[],5)`
```

Which, I believe is the slice that contains the maximum value reduced along the 5th dimension.

My attempt to convert this line to Julia is:

```
`_, idxs = findmax(abs.(X[1,:,:,:,:]), dims=5)`
```

However, this returns a 6x41x41x18 array. Clearly not the same, the first dimension is gone and the 5th isn’t reduced.

I must missing something obvious. Any pointers? And thanks.