I have an ndimenstional array of shape `1x17x3` whose output looks as follows 

```
[[[x1 y1 z1]
  [x2 y2 z2]
  [x3 y3 z3]
  [x17 y17 z17]]]

```

I want to extract the first two elements in a 1D vector as follows 

```
vec1 = [x1,y1,x2,y2, ....... x17,y17]
vec20 [z1,z2,z3..............z17]  

```

I tried to flatten the whole array and extract the elements but , I am not sure thats the right way to work . 

```
import numpy as np
test = np.random.rand(1,17,3)
print(test)
rev_mat = test.flatten()
print(rev_mat)

```