Normalizes an ndarray to zero mean and unit variance