Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation for passing anonymous functions not clear #145

Closed
sbfnk opened this issue Jun 20, 2024 · 0 comments
Closed

documentation for passing anonymous functions not clear #145

sbfnk opened this issue Jun 20, 2024 · 0 comments
Milestone

Comments

@sbfnk
Copy link
Contributor

sbfnk commented Jun 20, 2024

The documentation for passing anonymous functions is not clear. The current documentation for contact_distribution in sim_linelist states that this should be:

any discrete density function that produces non-negative integers

  • you wouldn't expect density functions to produce integers - do you mean a random sampler?
  • is the function expected to take any arguments, and if yes what should they represent? Do they need to be named?

For infectious_period it only says that it should be

an anonymous function

which is missing the same information - also, does it definitely have to be anonymous? It might help people if these could be pre-defined functions.

It might be good to add an example or two using this approach - when I tried I didn't really know how to do this given the available information. Perhaps copying some of the documentation in epichains would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants