variable_table.py

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

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

Write table of cases and their respective sources.

Parameters
source_dictdict

Dict of source and cases

out_streamfile-like object

Where to send human readable output. Set to None to suppress.

openmdao.utils.variable_table.write_var_table(pathname, var_list, var_type, var_dict, hierarchical=True, top_name='model', print_arrays=False, out_stream=None)[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’ or ‘implicit’

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

var_dictdict

dict storing vals and metadata for each var name

hierarchicalbool

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

top_namestr

the name of the top level group when using 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 Default is False.

out_streamfile-like object

Where to send human readable output. Set to None to suppress.