# Sub Mat in mulidimensional Mat

I want to convert some codes from python to c++ .
for example we have 3 dimensional array like (25 * 40 * 10) and we want to separate array, in python we have `numpy`

arrays and simply do it with:

```
Probs = Y[...,0]
Affines = Y[...,2:]
rx,ry = Y.shape[:2]
ywh = Y.shape[1::-1]
iwh = np.array(I.shape[1::-1],dtype=float).reshape((2,1))
```

but how can I implement this line in c++ with `Mat`

?