nispace.stats.coloc.rank1d

nispace.stats.coloc.rank1d(arr)[source]

Rank a 1D array using mid-ranks (average rank) for tied values. Constant arrays receive identical ranks -> zero variance -> NaN correlation. CAVE: does not handle nan’s; strip them before calling.