def scale(y, yerr):
    """ 
        Standardization of a given dataset y
        Parameters:
            y = data; subtract mean, divide by std 
            yerr = errors; divide by std of x
        Returns:
            standardized y and yerr 
    """
    m, s = y.mean(), y.std()
    return (y-m)/s, yerr/s