<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def r2z(r):
 """ Function that calculates the Fisher z-transformation Parameters r : int or ndarray Correlation value Returns result : int or ndarray Fishers z transformed correlation value """

    with np.errstate(invalid='ignore', divide='ignore'):
        return 0.5 * (np.log(1 + r) - np.log(1 - r))