def batchPhi_s_a(self, all_phi_s, all_actions,
                     all_phi_s_a=None, use_sparse=False):
        p, n = all_phi_s.shape
        a_num = self.actions_num
        if use_sparse:
            phi_s_a = sp.lil_matrix(
                (p, n * a_num), dtype=all_phi_s.dtype)
        else:
            phi_s_a = np.zeros((p, n * a_num), dtype=all_phi_s.dtype)

        for i in xrange(a_num):
            rows = np.where(all_actions == i)[0]
            if len(rows):
                phi_s_a[rows, i * n:(i + 1) * n] = all_phi_s[rows,:]
        return phi_s_a
Builds the feature vector for a series of state-action pairs (s,a)
dataset/ETHPy150Open rlpy/rlpy/rlpy/Representations/Representation.py/Representation.batchPhi_s_a