def RQ_sigma(self, sigma):
        if self._sa_pair:
            sigma = np.asarray(sigma)
            sigma_indices = np.empty(self.num_states, dtype=int)
            _find_indices(self.a_indices, self.a_indptr, sigma,
                          out=sigma_indices)
            R_sigma, Q_sigma = self.R[sigma_indices], self.Q[sigma_indices]
        else:
            R_sigma = self.R[np.arange(self.num_states), sigma]
            Q_sigma = self.Q[np.arange(self.num_states), sigma]

        return R_sigma, Q_sigma
Given a policy `sigma`, return the reward vector `R_sigma` and
dataset/ETHPy150Open QuantEcon/QuantEcon.py/quantecon/markov/ddp.py/DiscreteDP.RQ_sigma