Skip to content

Overview

laser.cholera

laser.cholera — LASER-based metapopulation cholera simulation.

Top-level package for LASIK (LASER-cholera). The bulk of the simulation lives in the metapop subpackage; this module's main job is to expose the package version and a couple of convenience re-exports.

Exports

version: Installed package version (read from package metadata). compute: Sample compute kernel from [laser.cholera.core]. iso_codes: Tuple of ISO-3 country codes covered by the bundled MOSAIC scenario; see laser.cholera.iso_codes.

__version__ module-attribute

__version__ = version('laser.cholera')

__all__ module-attribute

__all__ = ['__version__', 'compute', 'iso_codes']

compute

compute(args: list) -> object

Return the longest element of args (pure-Python fallback for _core.compute).

Parameters:

Name Type Description Default
args list

An iterable of items supporting len().

required

Returns:

Type Description
object

The element of args with the maximum len().

Source code in src/laser/cholera/core.py
def compute(args: list) -> object:
    """Return the longest element of `args` (pure-Python fallback for `_core.compute`).

    Args:
        args: An iterable of items supporting `len()`.

    Returns:
        The element of `args` with the maximum `len()`.
    """
    return max(args, key=len)