diff_sims#

class diff_sims(sim1, sim2, skip_key_diffs=False, skip=None, full=False, output=False, die=False)[source]#

Compute the difference of the summaries of two simulations, and print any values which differ.

Parameters:
  • sim1 (sim/dict) – either a simulation object or the sim.summary dictionary

  • sim2 (sim/dict) – ditto

  • skip_key_diffs (bool) – whether to skip keys that don’t match between sims

  • skip (list) – a list of values to skip

  • full (bool) – whether to use the full summary (else, brief)

  • output (bool) – whether to return the output as a string (otherwise print)

  • die (bool) – whether to raise an exception if the sims don’t match

  • require_run (bool) – require that the simulations have been run

Example:

s1 = hpv.Sim(rand_seed=1).run()
s2 = hpv.Sim(rand_seed=2).run()
hpv.diff_sims(s1, s2)