corr function from matlab is calculated manually in Python