get_printable_labels#
- get_printable_labels(item, suffix='', hr='――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――')[source]#
This function is used by the __str__ methods on all classes to get a nicely formatted list of labels on the object.
- Parameters:
item (dict) – The OpenPNM dictionary object with each dictionary key containing a numpy array
suffix (str, optional) – If provided, this will be attached to the end of every dictionary key so that ‘pore.viscosity’ becomes ‘pore.viscosity.phase_01’. This is a workaround to enhance the printing of component information on mixtures.
hr (str, optional) – The horizontal rule to use between the table heading and body
- Returns:
table – A formatted string that will output a 78 character wide table when printed
- Return type:
str
Notes
The table returned by this function only contains items that boolean arrays. Any numerical arrays are ignored.
See also