INNER CODE UNIT · Python

save

NorskRegnesentral/skweak · skweak/aggregation.py:240

    def save(self, filename):
        """Saves the aggregation model to a file"""
        fd = open(filename, "wb")
        pickle.dump(self, fd)
        fd.close()

    @classmethod
    def load(cls, pickle_file):
        """Loads the aggregation model from an existing file"""
        print("Loading", pickle_file)
        fd = open(pickle_file, "rb")
        ua = pickle.load(fd)
        fd.close()
        return ua



############################################

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…