Home > Blockchain >  Selecting and View Metrices
Selecting and View Metrices

Time:08-17

so i have this Multi-dimensional array with the shape (2,3,4,5)

Here is how it looks like.

rand_5 = 
array([[[[0, 2, 8, 9, 6],
         [4, 9, 7, 3, 3],
         [8, 3, 0, 1, 0],
         [0, 6, 7, 7, 9]],

        [[3, 0, 7, 7, 7],
         [0, 5, 4, 3, 1],
         [3, 1, 3, 4, 3],
         [1, 9, 5, 9, 1]],

        [[2, 3, 2, 2, 5],
         [7, 3, 0, 9, 9],
         [3, 4, 5, 3, 0],
         [4, 8, 6, 7, 2]]],


       [[[7, 3, 8, 6, 6],
         [5, 6, 5, 7, 1],
         [5, 4, 4, 9, 9],
         [0, 6, 2, 6, 8]],

        [[2, 4, 1, 6, 1],
         [5, 1, 6, 9, 8],
         [6, 5, 9, 7, 5],
         [4, 9, 6, 8, 1]],

        [[5, 5, 8, 3, 7],
         [7, 9, 4, 7, 5],
         [9, 6, 2, 0, 5],
         [3, 0, 5, 7, 1]]]])

the third metric in the second index metric(1) is shown below

is rand_5[1,2] = 
array([[5, 5, 8, 3, 7],
       [7, 9, 4, 7, 5],
       [9, 6, 2, 0, 5],
       [3, 0, 5, 7, 1]])

QUESTION?

My Question is how can i select from the 2nd,3rd row & 1st,2nd Column from the metric above, such that i have the result shown in the metric below.?

[9,6]
[3,0]

CodePudding user response:

With enter image description here

  • Related