load#

class load(*args, update=True, verbose=True, **kwargs)[source]#

Convenience method for sc.loadobj() and equivalent to hpv.Sim.load() or hpv.Scenarios.load().

Parameters:
  • filename (str) – file to load

  • do_migrate (bool) – whether to migrate if loading an old object

  • update (bool) – whether to modify the object to reflect the new version

  • verbose (bool) – whether to print migration information

  • args (list) – passed to sc.loadobj()

  • kwargs (dict) – passed to sc.loadobj()

Returns:

Loaded object

Examples:

sim = hpv.load('calib.sim') # Equivalent to hpv.Sim.load('calib.sim')
scens = hpv.load(filename='school-closures.scens', folder='schools')