Correlatiion coefficient calculations

Correlations can be calculated on raw data, data sets or groupings.
Could we return the new array instead of modifying in place? Alternatively, we should stress in the comments that this modifies the array in-place.