|
Methods defined here:
- formatter_init( format={}, indent=None, linelength=None, max=-1 )
Initialize the formatter with new default values.
Parameters
----------
format : dict {name : format }
name : "float64" or "int64"
fmt : " %fmt"
indent : None or int
number of spaces to indent *after* the first line
Default is 0
linelength : None or int
length of the lines produced
Default is 120
max : dict None or int
maximum number of items displayed, followed by ... if there is more.
None displays all. Default is 5br>
- fma( array, **kwargs )
Syntactic sugar for
formatter( array, max=None, **kwargs )
- formatter( array, format=None, indent=None, linelength=None, max=-1, tail=0 )
Format a number or an array nicely into a string
Parameters override defaults given earlier with init().
Parameters
----------
array : array_like or number
number or n-dim array of numbers
format : dict None or str
format applying to one item of the array
DEfault is "8.3f" for float; "8d" for int
indent : None or int
number of spaces to indent after the first line
Default is 0
linelength : None or int
length of the lines produced
Default is 120
max : None or int
maximum number of items displayed, followed by ... if there is more.
None displays all. Default is 5
tail : int
print the last items of the array, preceede by ...
only when the number of items is larger than max.
Default is 0
Return
------
string : containing the formatted array.
|