How to Caculate Pearson Value in SciPy

Here is an example:

import numpy as np
import scipy.stats as measures

y_pred = np.array([5,5,1], dtype=np.float32)
y_true = np.array([1,3,1], dtype=np.float32)

## Scipy
val2 = measures.pearsonr(y_pred, y_true)[0]
print("Scipy's Pearson: \t\t{}".format(val2))