Select max q value between specific indexes


At the moment I am using the code:

(np.flatnonzero(self.model.select_action(self.state) == np.max(self.model.select_action(self.state))))

to select the max Q-value from:

However, I would like to select the max Q-value between a certain set of indexes each time depending on the values from the state space i.e. round(self.state[0]) & round(self.stae[1])