Nilearn.glm.fdr_threshold, handling of positive and negative z-values

Dear all,

I am currently using the function nilearn.glm.fdr_threshold from nilearn and encountered an unexpected behavior.

When applying the function to a vector of z-values, I obtain an infinite threshold. However, when I apply it to the negated version of the same z-values, I obtain a finite threshold (around 3.1).

This makes me wonder whether the function is effectively computing the FDR threshold using only positive z-values.

Could anyone clarify how fdr_threshold handles positive vs negative statistics?

Thank you very much for your help!

Best regards,
Manon Pietrantoni