gaussian.save
- gaussian.save(save=False, fname='nrv_save.json', blacklist=[], **kwargs) dict
Generic saving method for
NRV_class
instance.- Parameters:
save (bool, optional) – If True, saves the NRV object in a json file, by default False.
fname (str, optional) – Name of the json file
blacklist (dict, optional) – Dictionary containing the keys to be excluded from the saving.
**kwargs (dict, optional) – Additional arguments to pass to the
save
method of the NRV object.
- Returns:
key_dict – dictionary containing the original instance data in a jsonisable format.
- Return type:
dict
Note
This
save
method does not save the object to a json file by default: It only returns a dictionary containing the original instance data in a jsonisable format. However, this is the simplest way to do it by setting thesave
parameter toTrue
.The dictionary returned by this save method can be modified without having any impact on the the original instance (the items are deep copies of the instance’s attributes).