Implementation of the pearson_correlation algorithm in python3