@@ -57,40 +57,40 @@ class set_options(object):
57
57
Defaults to 200.
58
58
- ``display_edgeitems`` : if number of lines to display is greater than ``display_maxlines``,
59
59
only the first and last ``display_edgeitems`` lines are displayed.
60
- Only active if ``display_maxlines`` is not None . Defaults to 5.
60
+ Only active if ``display_maxlines`` is not 0 . Defaults to 5.
61
61
62
62
Examples
63
63
--------
64
64
>>> from larray import *
65
- >>> arr = ndtest((500, 100), dtype=float) / 3
65
+ >>> arr = ndtest((500, 100), dtype=float) + 0.123456
66
66
67
67
You can use ``set_options`` either as a context manager:
68
68
69
69
>>> with set_options(display_width=100, display_edgeitems=2):
70
70
... print(arr)
71
- a\b b0 b1 ... b98 b99
72
- a0 0.0 0.3333333333333333 ... 32.666666666666664 33.0
73
- a1 33.333333333333336 33.666666666666664 ... 66.0 66.33333333333333
74
- ... ... ... ... ... ...
75
- a498 16600.0 16600.333333333332 ... 16632.666666666668 16633.0
76
- a499 16633.333333333332 16633.666666666668 ... 16666.0 16666.333333333332
71
+ a\b b0 b1 b2 ... b97 b98 b99
72
+ a0 0.123456 1.123456 2.123456 ... 97.123456 98.123456 99.123456
73
+ a1 100.123456 101.123456 102.123456 ... 197.123456 198.123456 199.123456
74
+ ... ... ... ... ... ... ... ...
75
+ a498 49800.123456 49801.123456 49802.123456 ... 49897.123456 49898.123456 49899.123456
76
+ a499 49900.123456 49901.123456 49902.123456 ... 49997.123456 49998.123456 49999.123456
77
77
78
78
Or to set global options:
79
79
80
80
>>> set_options(display_maxlines=10, display_precision=2) # doctest: +SKIP
81
81
>>> print(arr) # doctest: +SKIP
82
82
a\b b0 b1 b2 ... b97 b98 b99
83
- a0 0.00 0.33 0.67 ... 32.33 32.67 33.00
84
- a1 33.33 33.67 34.00 ... 65.67 66.00 66.33
85
- a2 66.67 67.00 67.33 ... 99.00 99.33 99.67
86
- a3 100.00 100.33 100.67 ... 132.33 132.67 133.00
87
- a4 133.33 133.67 134.00 ... 165.67 166.00 166.33
83
+ a0 0.12 1.12 2.12 ... 97.12 98.12 99.12
84
+ a1 100.12 101.12 102.12 ... 197.12 198.12 199.12
85
+ a2 200.12 201.12 202.12 ... 297.12 298.12 299.12
86
+ a3 300.12 301.12 302.12 ... 397.12 398.12 399.12
87
+ a4 400.12 401.12 402.12 ... 497.12 498.12 499.12
88
88
... ... ... ... ... ... ... ...
89
- a495 16500.00 16500.33 16500.67 ... 16532.33 16532.67 16533.00
90
- a496 16533.33 16533.67 16534.00 ... 16565.67 16566.00 16566.33
91
- a497 16566.67 16567.00 16567.33 ... 16599.00 16599.33 16599.67
92
- a498 16600.00 16600.33 16600.67 ... 16632.33 16632.67 16633.00
93
- a499 16633.33 16633.67 16634.00 ... 16665.67 16666.00 16666.33
89
+ a495 49500.12 49501.12 49502.12 ... 49597.12 49598.12 49599.12
90
+ a496 49600.12 49601.12 49602.12 ... 49697.12 49698.12 49699.12
91
+ a497 49700.12 49701.12 49702.12 ... 49797.12 49798.12 49799.12
92
+ a498 49800.12 49801.12 49802.12 ... 49897.12 49898.12 49899.12
93
+ a499 49900.12 49901.12 49902.12 ... 49997.12 49998.12 49999.12
94
94
"""
95
95
96
96
def __init__ (self , ** kwargs ):
0 commit comments