11from __future__ import absolute_import , division , print_function
22
3- from larray .util .misc import basestring
4-
53
64__all__ = ['set_options' , 'get_options' ]
75
@@ -52,6 +50,7 @@ class set_options(object):
5250 Currently supported options:
5351
5452 - ``display_precision``: number of digits of precision for floating point output.
53+ Print as many digits as necessary to uniquely specify the value by default (None).
5554 - ``display_width``: maximum display width for ``repr`` on larray objects. Defaults to 80.
5655 - ``display_maxlines``: Maximum number of lines to show. All lines are shown if -1.
5756 Defaults to 200.
@@ -91,6 +90,11 @@ class set_options(object):
9190 a497 49700.12 49701.12 49702.12 ... 49797.12 49798.12 49799.12
9291 a498 49800.12 49801.12 49802.12 ... 49897.12 49898.12 49899.12
9392 a499 49900.12 49901.12 49902.12 ... 49997.12 49998.12 49999.12
93+
94+ To put back the default options, you can use:
95+
96+ >>> set_options(display_precision=None, display_width=80, display_maxlines=200, display_edgeitems=5)
97+ ... # doctest: +SKIP
9498 """
9599
96100 def __init__ (self , ** kwargs ):
@@ -118,7 +122,7 @@ def get_options():
118122 -------
119123 Dictionary of current print options with keys
120124
121- - display_precision: int
125+ - display_precision: int or None
122126 - display_width: int
123127 - display_maxlines: int
124128 - display_edgeitems : int
@@ -134,4 +138,4 @@ def get_options():
134138 >>> get_options()
135139 {'display_precision': None, 'display_width': 80, 'display_maxlines': 200, 'display_edgeitems': 5}
136140 """
137- return _OPTIONS .copy ()
141+ return _OPTIONS .copy ()
0 commit comments