radtools.print_2d_array#
- radtools.print_2d_array(array, fmt='.2f', highlight=False, print_result=True, borders=True, shift=0)[source]#
Print 1D and 2D arrays in the terminal.
Added in version 0.7.
Changed in version 0.7.11: Renamed from
print_2D_array- Parameters:
- array(N,) or (N, M) array-like
Array to be printed.
- fmtstr
Format string.
- highlightbool, default False
Whether to highlight positive and negative values. Only works for real-valued arrays.
Changed in version 0.7.11: Renamed from
posneg- print_resultbool, default True
Whether to print the result or return it as a string.
- bordersbool, default True
Whether to print borders around the array.
Added in version 0.7.11.
- shiftint, default 0
Shifts the array to the right by
shiftcolumns.Added in version 0.7.11.
- Returns:
- stringstr
String representation of the array. Returned only if
print_resultis False.