# mater
class mater.Converged
    tolerance: float = 1e-10
    max_iterations: int = 1000
    def __init__(self, tolerance: float = 1e-10, max_iterations: int = 1000) -> None
class mater.DatasetValidationError(ValueError)
    def __init__(self, issues: Sequence[ValidationIssue]) -> None
    issues = tuple(issues)
class mater.InputProblems(ValueError)
    def __init__(self, problems: Sequence[Problem]) -> None
    problems = tuple(problems)
def mater.available_extensions() -> list[str]
def mater.check_inputs(source: Source | str | os.PathLike | InputVariables, simulation_start_time: Time = 1901, simulation_end_time: Time = 2100, extensions: Extensions = DEFAULT_EXTENSIONS, interpolation: Mapping[str, str] | None = None, *, requires: Mapping[str, str] | None = None) -> list[Problem]
def mater.load_prepared(path: str | os.PathLike, resolve: Callable[[str], Any] | None = None) -> Prepared
def mater.prepare(source: Source, simulation_start_time: Time = 1901, simulation_end_time: Time = 2100, extensions: Extensions = DEFAULT_EXTENSIONS, interpolation: Mapping[str, str] | None = None, converged: ConvergedMode = True, *, requires: Mapping[str, str] | None = None) -> Prepared
def mater.run_from_dict(variables: InputVariables, simulation_name: str = 'run0', extensions: Extensions = DEFAULT_EXTENSIONS, simulation_start_time: Time = 1901, simulation_end_time: Time = 2100, time_frequency: TimeFrequency = 'YS', output: ParquetOutput | None = None, *, interpolation: Mapping[str, str] | None = None, on_step: OnStep = None, converged: ConvergedMode = True, progress: bool = True) -> Path
def mater.run_from_excel(file_path: str | os.PathLike, simulation_name: str = 'run0', extensions: Extensions = DEFAULT_EXTENSIONS, simulation_start_time: Time = 1901, simulation_end_time: Time = 2100, time_frequency: TimeFrequency = 'YS', output: ParquetOutput | None = None, *, interpolation: Mapping[str, str] | None = None, on_step: OnStep = None, converged: ConvergedMode = True, progress: bool = True) -> Path
def mater.run_prepared(prepared: Prepared, output: ParquetOutput | None = None, on_step: OnStep = None, *, progress: bool = True) -> Path | None
def mater.run_simulation(source: Source, destination: ParquetOutput | None = None, extensions: Extensions = DEFAULT_EXTENSIONS, simulation_start_time: Time = 1901, simulation_end_time: Time = 2100, time_frequency: TimeFrequency = 'YS', *, interpolation: Mapping[str, str] | None = None, on_step: OnStep = None, converged: ConvergedMode = True, progress: bool = True) -> Path

# mater.io
class mater.io.ExcelInput(BaseModel)
    path: str | os.PathLike
    def read(self) -> dict[str, pd.Series | pd.DataFrame]
    def requirements(self) -> dict[str, str]
class mater.io.JsonDatasetInput(BaseModel)
    path: str | os.PathLike
    def read(self) -> dict[str, pd.Series | pd.DataFrame]
class mater.io.MappingInput(BaseModel)
    model_config = ConfigDict(arbitrary_types_allowed=True)
    variables: Mapping[str, Any]
    def read(self) -> dict[str, pd.Series | pd.DataFrame]
class mater.io.ParquetDatasetInput(BaseModel)
    path: Path
    batch_size: int = Field(default=65536, ge=1)
    def read(self) -> dict[str, pd.Series | pd.DataFrame]
class mater.io.ParquetOutput(BaseModel)
    base_path: Path
    simulation_name: str
    license: str = 'NOASSERTION'
    source: AnyUrl | None = None
    max_buffer_memory_mb: float = Field(default=256, gt=0, allow_inf_nan=False)
    threads: int | None = Field(default=None, ge=1)
    variables: tuple[str, ...] | None = None
    output_years: PositiveInt | tuple[int, ...] | None = None
    if_exists: Literal['replace', 'keep_both', 'error'] = 'replace'
    significant_digits: int | None = Field(default=None, ge=1, le=15)
def mater.io.read_outputs(path: str | os.PathLike, variables: Iterable[str] | None = None, *, inputs: Literal['given_years', 'every_step'] = 'given_years', labels: Mapping[str, str | Iterable[str]] | None = None, years: int | Iterable[int] | None = None) -> dict[str, pd.Series | pd.DataFrame]

# mater.extensions
class mater.extensions.Cohorts
    name: str
    variable: str
    total: str
    law: Law
    parameters: Mapping[str, str]
    where: Mapping[str, Hashable] = field(default_factory=dict)
    via: str | None = None
    entry: str = 'end'
    initial: str = 'steady_state'
    max_age: int | None = None
    def __init__(self, name: str, variable: str, total: str, law: Law, parameters: Mapping[str, str], where: Mapping[str, Hashable] = dict(), via: str | None = None, entry: str = 'end', initial: str = 'steady_state', max_age: int | None = None) -> None
class mater.extensions.Context
    def __init__(self, loop: _Loop) -> None
    time_step = 1.0
    def past(self, name: str, steps: int) -> np.ndarray
    def seed(self, name: str) -> np.ndarray
class mater.extensions.Equation
    id: str
    output: str
    function: Callable[..., Any]
    after: tuple[str, ...] = ()
    property name: str
    def __init__(self, id: str, output: str, function: Callable[..., Any], after: tuple[str, ...] = ()) -> None
class mater.extensions.Extension
    name: str
    version: str
    variables: tuple[Variable, ...] = ()
    equations: tuple[Equation, ...] = ()
    topology_seeds: Mapping[str, str] = field(default_factory=dict)
    requires: tuple[str, ...] = ()
    relations: Mapping[str, Relation] = field(default_factory=dict)
    masks: Mapping[str, Mask] = field(default_factory=dict)
    history: Mapping[str, int] = field(default_factory=dict)
    groups: tuple[Group, ...] = ()
    checks: tuple[Callable[..., Any], ...] = ()
    cohorts: tuple[Cohorts, ...] = ()
    step_checks: tuple[Callable[..., Any], ...] = ()
    def __init__(self, name: str, version: str, variables: tuple[Variable, ...] = (), equations: tuple[Equation, ...] = (), topology_seeds: Mapping[str, str] = dict(), requires: tuple[str, ...] = (), relations: Mapping[str, Relation] = dict(), masks: Mapping[str, Mask] = dict(), history: Mapping[str, int] = dict(), groups: tuple[Group, ...] = (), checks: tuple[Callable[..., Any], ...] = (), cohorts: tuple[Cohorts, ...] = (), step_checks: tuple[Callable[..., Any], ...] = ()) -> None
class mater.extensions.Group
    name: str
    equations: tuple[str, ...]
    tolerance: float = 1e-10
    max_iterations: int = 100
    def __init__(self, name: str, equations: tuple[str, ...], tolerance: float = 1e-10, max_iterations: int = 100) -> None
class mater.extensions.Law
    name: str
    parameters: tuple[str, ...]
    survival: Callable[..., Any]
    def __init__(self, name: str, parameters: tuple[str, ...], survival: Callable[..., Any]) -> None
mater.extensions.MISSING = '<missing>'
class mater.extensions.Mask
    family: Dims
    where: Mapping[str, Hashable]
    def __init__(self, family: Dims, where: Mapping[str, Hashable]) -> None
mater.extensions.PRESENT = '<present>'
class mater.extensions.Problem
    message: str
    warning: bool = False
    def __init__(self, message: str, warning: bool = False) -> None
class mater.extensions.Relation
    source: Dims
    target: Dims
    rename: Mapping[str, str] = field(default_factory=dict)
    at: Mapping[str, Hashable] = field(default_factory=dict)
    where: Mapping[str, Hashable] = field(default_factory=dict)
    creates: bool = False
    def __init__(self, source: Dims, target: Dims, rename: Mapping[str, str] = dict(), at: Mapping[str, Hashable] = dict(), where: Mapping[str, Hashable] = dict(), creates: bool = False) -> None
class mater.extensions.Variable
    name: str
    dimensions: tuple[str, ...]
    required: bool = False
    description: str = ''
    shares: bool = False
    unit: Callable[..., Any] | None = None
    def __init__(self, name: str, dimensions: tuple[str, ...], required: bool = False, description: str = '', shares: bool = False, unit: Callable[..., Any] | None = None) -> None
def mater.extensions.add_present(*values: np.ndarray) -> np.ndarray
def mater.extensions.age_cohorts(state: np.ndarray, cohorts: CohortTable, total: np.ndarray, removed: np.ndarray | None = None) -> np.ndarray
def mater.extensions.available_extensions() -> list[str]
def mater.extensions.cohort_outflow(state: np.ndarray, cohorts: CohortTable, removed: np.ndarray | None = None, entering: np.ndarray | None = None) -> np.ndarray
def mater.extensions.get_extension(name: str) -> Extension
def mater.extensions.max_by(values: np.ndarray, key: Key) -> np.ndarray
def mater.extensions.min_by(values: np.ndarray, key: Key) -> np.ndarray
def mater.extensions.oldest_first(held: np.ndarray, amount: np.ndarray) -> np.ndarray
def mater.extensions.overlay(primary: np.ndarray | None, fallback: np.ndarray | None) -> np.ndarray | None
def mater.extensions.place(values: np.ndarray, key: Key) -> np.ndarray
def mater.extensions.pro_rata(held: np.ndarray, amount: np.ndarray) -> np.ndarray
def mater.extensions.removed_by_age(state: np.ndarray, cohorts: CohortTable, amount: np.ndarray, rule: Callable[..., np.ndarray], *by_row: np.ndarray) -> np.ndarray | None
def mater.extensions.spread(target_values: np.ndarray, key: Key) -> np.ndarray
def mater.extensions.sum_by(values: np.ndarray, key: Key) -> np.ndarray
