Decoding with desynchronized fMRI acquisition

Hi there,
I’m struggling to build a decoder with a de-synchronized fMRI acquisition using nilearn (i.e., TR = 2 sec and image presentation = 3 sec). Concretely, I can’t reduce my fMRI acquisition by using:

fmri_niimgs = index_img(fmri_ses1, condition_mask)

I get the following error:

IndexError: boolean index did not match indexed array along dimension 3; dimension is 206 but corresponding boolean dimension is 146

Any thoughts?