Python Interface#
The Python interface provides a thin wrapper around cmdstanpy.CmdStanModel to facilitate working with the gptools library.
Function Reference#
- compile_model(model_name: str | None = None, stan_file: str | PathLike | None = None, exe_file: str | PathLike | None = None, compile: bool | str = True, stanc_options: Dict[str, Any] | None = None, cpp_options: Dict[str, Any] | None = None, user_header: str | PathLike | None = None, cls: Type | None = None, **kwargs) CmdStanModel#
Create a
cmdstanpy.CmdStanModeland configure include paths for gptools.- Parameters:
model_name – Model name used for output file names (defaults to base name of
stan_file).stan_file – Path to Stan model file.
exe_file – Path to compiled executable file. Optional unless
stan_fileis not given. If bothstan_fileandexe_fileare given, the base names must match.compile – Whether or not to compile the model (defaults to
True). If"force", the model will compile even if a newer executable is found.stanc_options – Stanc3 compiler options (see here for details).
cpp_options – C++ compiler options.
user_header – Path to a C++ header file to include during compilation.
cls – Subclass of
cmdstanpy.CmdStanModelif a custom implementation should be used.**kwargs – Keyword arguments passed to the
cmdstanpy.CmdStanModelconstructor.
- Returns:
model – Model instance with include paths configured for gptools.