Join Data Science Interview MasterClass (in 3 weeks) 🚀 led by FAANG Data Scientists | Just 6 seats remaining...
Given two arrays of numbers representing paired observations, compute the Pearson correlation coefficient between them using NumPy.
Return the correlation coefficient rounded to 2 decimal places.
| Argument | Type |
|---|---|
| nums1 | np.ndarray |
| nums2 | np.ndarray |
| Return Name | Type |
|---|---|
| value | float |
where is the length of each array.
The two input arrays must have the same length.