bnmetrics.adapter

Input-graph adapter: normalise everything to (n_vars, endpoints, var_names).

Functions

to_graphlike(→ bnmetrics._graph._Graph)

Public-facing wrapper returning a concrete _Graph (a GraphLike).

Module Contents

bnmetrics.adapter.to_graphlike(obj: object, *, var_names: tuple[str, Ellipsis] | list[str] | None = None) bnmetrics._graph._Graph[source]

Public-facing wrapper returning a concrete _Graph (a GraphLike).

Useful when callers want a normalised handle once and then pass it repeatedly to bnmetrics functions without re-validating each time.