def normalize(data):
data = data.astype(float)<EOL>data -= data.mean()<EOL>return data / data.std()<EOL>
Function to normalize data to have mean 0 and unity standard deviation
(also called z-transform)


Parameters
----------
data : numpy.ndarray


Returns
-------
numpy.ndarray
    z-transform of input array