variable_table.py#

Utility functions and constants related to writing a table of variable metadata.

openmdao.utils.variable_table.write_source_table(source_dicts, out_stream)[source]

Write tables of cases and their respective sources.

Parameters:
source_dictsdict or list of dicts

Dict of source and cases.

out_streamfile-like object

Where to send human readable output.

openmdao.utils.variable_table.write_var_table(pathname, var_list, var_type, var_dict, hierarchical=True, print_arrays=False, out_stream=DEFAULT_OUT_STREAM)[source]

Write table of variable names, values, residuals, and metadata to out_stream.

Parameters:
pathnamestr

Pathname to be printed. If None, defaults to ‘model’.

var_listlist of str

List of variable names in the order they are to be written.

var_type‘input’, ‘explicit’, ‘implicit’, or ‘all’

Indicates type of variables, input or explicit/implicit output, or all for all vars.

var_dictdict

Dict storing vals and metadata for each var name.

hierarchicalbool

When True, human readable output shows variables in hierarchical format.

print_arraysbool

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.

out_streamfile-like object

Where to send human readable output.