formatter¶
-
sf3dmodels.tools.formatter(prop_keys, fmt='%.6e', base='', default='%.6e')[source] [edit on github]¶ Formatter function for a given set of properties.
Parameters: - fmt : str or dict, optional
If str: Format string for all the columns. Defaults to ‘%.6e’.
If dict: the input keys of the dictionary must be present in the
prop_keyslist. The keys fromprop_keyswhich were not specified in thefmtdict, will return the default formatdefault.- base : str, optional
Preceding format(s) to the final-computed format string. Defaults to None.
- default : str, optional
Default format for non-specified keys if fmt is dict.
Returns: - fmt_string : str
String with the computed set of formats, to be used on output prints or files.