Dx#

class Dx(df, hierarchy=None, *args, **kwargs)[source]#

Bases: Product

Generic class for diagnostics

Attributes

default_value

now

Shortcut to self.t.now()

states

Return a flat list of all states

statesdict

Return a flat dictionary (objdict) of all states

ti

Get the current module timestep

timevec

Shortcut to self.t.timevec

Methods

administer(uids, return_format='dict')[source]#

Administer a testing product.

Returns:

an array of length len(inds) with integer entries that map each person to one of the result_states if return_format==’dict’: a dictionary keyed by result_states with values containing the indices of people classified into this state

Return type:

if return_format==’array’