I'd use a freq_mask here eg:

freq_mask = (frequencies > 8) & (frequencies < 12)
csd = np.mean(csds[:, :, freq_mask], 2)