def standardize(X):
    """Z-transform an array

    param X: An N x D array where N is the number of examples and D is the number of features

    returns: An N x D array where every column has been rescaled to 0 mean and unit variance
    """
    return (X - X.mean())/X.std(ddof=1)