File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from .pod_rbf import *
22
3- __version__ = "1.2.1 "
3+ __version__ = "1.3.0 "
Original file line number Diff line number Diff line change 77import os
88import numpy as np
99from tqdm import tqdm
10- from numba import jit , njit , prange
10+ import pickle
1111
1212
1313class pod_rbf :
@@ -311,3 +311,39 @@ def buildSnapshotMatrix(mypath_pattern,
311311 i += 1
312312
313313 return snapshot
314+
315+
316+ def save_model (filename , model ):
317+ """Save the model. Uses Pythons pickle module.
318+
319+ Parameters
320+ ----------
321+ filename_pattern : string
322+ The full path of the model to be saved.
323+
324+ Returns
325+ -------
326+ None
327+ """
328+ file = open (filename , 'ab' )
329+ pickle .dump (model , file )
330+ file .close ()
331+
332+
333+ def load_model (filename ):
334+ """Load the model.
335+
336+ Parameters
337+ ----------
338+ filename_pattern : string
339+ The full path of the file that has the model saved.
340+
341+ Returns
342+ -------
343+ object
344+ The model object.
345+ """
346+ file = open (filename , 'rb' )
347+ model = pickle .load (file )
348+ file .close ()
349+ return model
You can’t perform that action at this time.
0 commit comments