baybe.utils.plotting.to_string

baybe.utils.plotting.to_string(header: str, *fields: Any, single_line: bool = False)[source]

Create a nested string representation.

Parameters:
  • header (str) – The header, typically the name of a class.

  • *fields (Any) – Fields to be printed with an indentation.

  • single_line (bool) – If True, print the representation on a single line. Only applicable when given a single field.

Raises:

ValueError – If single_line is True but fields contains more than one element.

Return type:

str

Returns:

The string representation with indented fields.