Result#
- class Result(name=None, label=None, dtype=<class 'float'>, shape=None, scale=True, auto_plot=True, module=None, values=None, timevec=None, low=None, high=None)[source]#
Bases:
BaseArr
Array-like container for holding sim results.
- Parameters:
module (str) – the name of the parent module, e.g. ‘hiv’
name (str) – the name of this result, e.g. ‘new_infections’
shape (int/tuple) – the shape of the result array (usually module.npts)
scale (bool) – whether or not the result scales by population size (e.g. a count does, a prevalence does not)
auto_plot (bool) – whether to include automatically in sim.plot() results
label (str) – a human-readable label for the result
values (array) – prepopulate the Result with these values
timevec (array) – an array of time points
low (array) – values for the lower bound
high (array) – values for the upper bound
In most cases,
ss.Result
behaves exactly likenp.array()
, except with the additional fields listed above. To see everything contained in a result, you can use result.disp().Attributes
<label>, e.g. "HIV: New infections".
Check whether the time vector uses dates (rather than numbers)
initialized
<module>.<name>, e.g. "hiv.new_infections".
Methods
- property has_dates#
Check whether the time vector uses dates (rather than numbers)
- property key#
<module>.<name>, e.g. “hiv.new_infections”
- Type:
Return the unique key of the result
- property full_label#
<label>, e.g. “HIV: New infections”
- Type:
Return the full label of the result
- Type:
<Module>