correlate_arr¶
Import in python using from mcutils.scripts.cifti.correlate import correlate_arr
-
mcutils.scripts.cifti.correlate.
correlate_arr
(arr1, arr2, collapse=False)[source]¶ Computes the Pearson r correlation for two arrays
- Parameters
arr1 – (M, N) array for N observations of M variables
arr2 – (M, K) array for K obsevations of M variables
collapse – assume N==K and only return (N, ) array with the r correlation
- Returns
(N, K) array with the r correlation (or (N, ) array if collapse is set)