cosapp.tools.views.prettyprint¶
Pretty print functions for inputs and outputs.
Functions
|
Return and optionally log a list of input names and other optional information. |
|
Return and optionally log a list of input names and other optional information. |
|
Return and optionally log a list of input names and other optional information. |
|
Return and optionally log a list of input names and other optional information. |
- cosapp.tools.views.prettyprint.get_list_inputs(system: System, values: bool = True, inwards: bool = False, parent_name: str = '', with_unfrozen_data: bool = True, itself: bool = False) List[Tuple[str, Dict[str, Any]]][source]¶
Return and optionally log a list of input names and other optional information.
- Parameters:
system (System) – System to be listed
values (bool, optional) – When True, take into account input values. Default is True.
inwards (bool, optional) – When True, take into account inwards values. Default is False
parent_name (string, optional) – Where to store parent name during recursion
with_unfrozen_data (bool, optional) – When True, include the unfrozen inwards. Default is True
itself (bool, optional) – When True, include own inwards, outwards and port in the list
- Returns:
list of input names and other optional information about those inputs
- Return type:
list_in
- cosapp.tools.views.prettyprint.get_list_outputs(system: System, values: bool = True, residuals: bool = False, local: bool = False, parent_name: str = '', itself: bool = False) List[Tuple[str, Dict[str, Any]]][source]¶
Return and optionally log a list of input names and other optional information.
- Parameters:
system (System) – System to be listed
values (bool, optional) – When True, take into account input values. Default is True.
residuals (bool, optional) – When True, take into account residual values. Default is False.
local (bool, optional) – When True, display/return local variables. Default is False.
parent_name (string, optional) – Where to store parent name during recursion
itself (bool, optional) – When True, include own inwards, outwards and port in the list
- Returns:
list of output names and other optional information about those outputs
- Return type:
list_out
- cosapp.tools.views.prettyprint.list_inputs(system: ~cosapp.systems.system.System, values: bool = True, inwards: bool = False, hierarchical: bool = True, print_arrays: bool = False, itself: bool = False, out_stream=<object object>) List[Tuple[str, Dict[str, Any]]][source]¶
Return and optionally log a list of input names and other optional information.
- Parameters:
system (System) – System to be listed
values (bool, optional) – When True, display/return input values. Default is True.
inwards (bool, optional) – When True, display/return inwards values. Default is False.
hierarchical (bool, optional) – When True, human readable output shows variables in hierarchical format.
print_arrays (bool, optional) – When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False.
itself (bool, optional) – When True, include own inwards, outwards and port in the list
out_stream (file-like object) – Where to send human readable output. Default is sys.stdout. Set to None to suppress.
- Returns:
list of input names and other optional information about those inputs
- Return type:
list
- cosapp.tools.views.prettyprint.list_outputs(system: ~cosapp.systems.system.System, values: bool = True, local: bool = False, residuals: bool = False, hierarchical: bool = True, print_arrays: bool = False, itself: bool = False, out_stream=<object object>) List[Tuple[str, Dict[str, Any]]][source]¶
Return and optionally log a list of input names and other optional information.
- Parameters:
system (System) – System to be listed
values (bool, optional) – When True, display/return input values. Default is True.
local (bool, optional) – When True, display/return local values. Default is False.
residuals (bool, optional) – When True, display/return residual values. Default is False.
hierarchical (bool, optional) – When True, human readable output shows variables in hierarchical format.
print_arrays (bool, optional) – When False, in the columnar display, just display norm of any ndarrays with size > 1. The norm is surrounded by vertical bars to indicate that it is a norm. When True, also display full values of the ndarray below the row. Format is affected by the values set with numpy.set_printoptions Default is False.
itself (bool, optional) – When True, include own inwards, outwards and port in the list
out_stream (file-like object) – Where to send human readable output. Default is sys.stdout. Set to None to suppress.
- Returns:
list of output names and other optional information about those outputs
- Return type:
list