import pickle


def load_scaler(filename):
    """
    This functions loads a saved scaler

    Arguments:
    filename -- name of the file from where to load the scaler

    Return:
    scaler -- the loaded scaler from file
    """

    try:
        file = open(filename, 'rb')
        scaler = pickle.load(file)
        return scaler
    except FileNotFoundError:
        pass