kde_cpi.output.utils module

Shared helpers for CPI plotting.

kde_cpi.output.utils.ensure_directory(path)[source]

Create the directory at path if needed and return its Path.

Return type:

Path

Parameters:

path (str | Path)

kde_cpi.output.utils.format_percent(value)[source]

Format a value expressed in fractions as a percentage string.

Return type:

str

Parameters:

value (float)

kde_cpi.output.utils.to_numpy(values)[source]

Return the input values as a 1D NumPy float array.

Return type:

ndarray

Parameters:

values (Iterable[float])