openmdao/utils/write_outputs.py
def _write_outputs_rows(out_stream, row, column_names, dict_of_outputs, print_arrays):
    """
    For one variable, write name, values, residuals, and metadata to out_stream.

    Parameters
    ----------
    out_stream : file-like object
        Where to send human readable output.
        Set to None to suppress.
    row : str
        The string containing the contents of the beginning of this row output.
        Contains the name of the System or varname, possibley indented to show hierarchy.

    column_names : list of str
        Indicates which columns will be written in this row.

    dict_of_outputs : dict
        Contains the values to be written in this row. Keys are columns names.

    print_arrays : bool
        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.

    """
    if out_stream is None:
        return
    left_column_width = len(row)
    have_array_values = []  # keep track of which values are arrays
    for column_name in column_names:
        row += column_spacing * ' '
        if isinstance(dict_of_outputs[column_name], np.ndarray) and \
                dict_of_outputs[column_name].size > 1:
            have_array_values.append(column_name)
            out = '|{}|'.format(
                str(np.linalg.norm(dict_of_outputs[column_name])))
        else:
            out = str(dict_of_outputs[column_name])
        row += '{:{align}{width}}'.format(out, align=align,
                                          width=column_widths[column_name])
    out_stream.write(row + '\n')
    if print_arrays:
        for column_name in have_array_values:
            out_stream.write("{}  {}:\n".format(
                left_column_width * ' ', column_name))
            out_str = str(dict_of_outputs[column_name])
            indented_lines = [(left_column_width + indent_inc) * ' ' +
                              s for s in out_str.splitlines()]
            out_stream.write('\n'.join(indented_lines) + '\n')

    For one variable, write name, values, residuals, and metadata to out_stream.

    Parameters
    ----------
    out_stream : file-like object
        Where to send human readable output.
        Set to None to suppress.
    row : str
        The string containing the contents of the beginning of this row output.
        Contains the name of the System or varname, possibley indented to show hierarchy.

    column_names : list of str
        Indicates which columns will be written in this row.

    dict_of_outputs : dict
        Contains the values to be written in this row. Keys are columns names.

    print_arrays : bool
        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.

    
For one variable, write name, values, residuals, and metadata to out_stream.
Parameters

out_stream : file-like object
Where to send human readable output.
Set to None to suppress.
row : str
The string containing the contents of the beginning of this row output.
Contains the name of the System or varname, possibley indented to show hierarchy.

column_names : list of str
Indicates which columns will be written in this row.

dict_of_outputs : dict
Contains the values to be written in this row. Keys are columns names.

print_arrays : bool
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.
For one variable write name values residuals and metadata to out_stream . Parameters out_stream : file - like object Where to send human readable output . Set to None to suppress . row : str The string containing the contents of the beginning of this row output . Contains the name of the System or varname possibley indented to show hierarchy . column_names : list of str Indicates which columns will be written in this row . dict_of_outputs : dict Contains the values to be written in this row . Keys are columns names . print_arrays : bool 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 .
def _write_outputs_rows(out_stream, row, column_names, dict_of_outputs, print_arrays):
    if out_stream is None:
        return
    left_column_width = len(row)
    have_array_values = []  
    for column_name in column_names:
        row += column_spacing * ' '
        if isinstance(dict_of_outputs[column_name], np.ndarray) and \
                dict_of_outputs[column_name].size > 1:
            have_array_values.append(column_name)
            out = '|{}|'.format(
                str(np.linalg.norm(dict_of_outputs[column_name])))
        else:
            out = str(dict_of_outputs[column_name])
        row += '{:{align}{width}}'.format(out, align=align,
                                          width=column_widths[column_name])
    out_stream.write(row + '\n')
    if print_arrays:
        for column_name in have_array_values:
            out_stream.write("{}  {}:\n".format(
                left_column_width * ' ', column_name))
            out_str = str(dict_of_outputs[column_name])
            indented_lines = [(left_column_width + indent_inc) * ' ' +
                              s for s in out_str.splitlines()]
            out_stream.write('\n'.join(indented_lines) + '\n')
def _write_outputs_rows ( out_stream , row , column_names , dict_of_outputs , print_arrays ) : if out_stream is None : return left_column_width = len ( row ) have_array_values = [ ] for column_name in column_names : row += column_spacing * ' ' if isinstance ( dict_of_outputs [ column_name ] , np . ndarray ) and dict_of_outputs [ column_name ] . size > 1 : have_array_values . append ( column_name ) out = '|{}|' . format ( str ( np . linalg . norm ( dict_of_outputs [ column_name ] ) ) ) else : out = str ( dict_of_outputs [ column_name ] ) row += '{:{align}{width}}' . format ( out , align = align , width = column_widths [ column_name ] ) out_stream . write ( row + '\n' ) if print_arrays : for column_name in have_array_values : out_stream . write ( "{}  {}:\n" . format ( left_column_width * ' ' , column_name ) ) out_str = str ( dict_of_outputs [ column_name ] ) indented_lines = [ ( left_column_width + indent_inc ) * ' ' + s for s in out_str . splitlines ( ) ] out_stream . write ( '\n' . join ( indented_lines ) + '\n' )
For one variable, write name, values, residuals, and metadata to out_stream.
For one variable write name values residuals and metadata to out_stream .
"""
    For one variable, write name, values, residuals, and metadata to out_stream.

    Parameters
    ----------
    out_stream : file-like object
        Where to send human readable output.
        Set to None to suppress.
    row : str
        The string containing the contents of the beginning of this row output.
        Contains the name of the System or varname, possibley indented to show hierarchy.

    column_names : list of str
        Indicates which columns will be written in this row.

    dict_of_outputs : dict
        Contains the values to be written in this row. Keys are columns names.

    print_arrays : bool
        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.

    """ # keep track of which values are arrays
out_stream
row
column_names
dict_of_outputs
print_arrays