utils#
Numerical utilities for running hpvsim.
Functions
Draw a sample from the distribution specified by the input. |
|
Return a probability density function for the specified distribution. |
|
Reset the random seed. |
|
Perform multiple binomial (Bernolli) trials |
|
Binomial "filter" -- the same as n_binomial, except return the elements of arr that succeeded. |
|
Binomial (Bernoulli) trials each with different probabilities. |
|
An array of multinomial trials. |
|
A Poisson trial. |
|
An array of Poisson trials. |
|
An array of negative binomial trials. |
|
Choose a subset of items (e.g., people) without replacement. |
|
Choose a subset of items (e.g., people), with replacement. |
|
Choose n items (e.g. people), each with a probability from the distribution probs. |
|
Apply age-specific participation filter to eligible individuals. |
|
Returns the indices of the values of the array that are true: just an alias for arr.nonzero()[0]. |
|
Returns the indices of the values of the array that are false. |
|
Returns the indices of the values of the array that are not-nan. |
|
Returns the indices of the values of the array that are not-nan. |
|
Returns the indices that are true in the array -- name is short for indices[true] |
|
Returns the indices that are true in the array -- name is short for indices[false] |
|
Returns the indices that are defined in the array -- name is short for indices[defined] |
|
Returns the indices that are undefined in the array -- name is short for indices[undefined] |
|
Returns the indices that are true in the array -- name is short for indices[true[indices]] |
|
Returns the indices that are false in the array -- name is short for indices[false[indices]] |
|
Returns the indices that are defined in the array -- name is short for indices[defined[indices]] |
|
Returns the indices that are undefined in the array -- name is short for indices[defined[indices]] |
|
Rounds the values in the array to the nearest timestep |
|
Find which duration bin each ind belongs to. |