nimare.stats.pearson

pearson(x, y)[source]

Correlate row vector x with each row vector in 2D array y, quickly.

Parameters
  • x ((1, N) array_like) – Row vector to correlate with each row in y.

  • y ((M, N) array_like) – Array, for which each row is correlated with x.

Returns

rs ((M,) numpy.ndarray) – Pearson correlation coefficients for x against each row of y.