HOME


sh-3ll 1.0
DIR:/usr/local/lib/python3.6/site-packages/xarray/core/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/xarray/core/__pycache__/options.cpython-36.pyc
3

���hc�@sddiZGdd�de�ZdS)Z
display_width�Pc@s(eZdZdZdd�Zdd�Zdd�ZdS)	�set_optionsa%Set global state within a controlled context

    Currently, the only supported option is ``display_width``, which has a
    default value of 80.

    You can use ``set_options`` either as a context manager:

    >>> ds = xr.Dataset({'x': np.arange(1000)})
    >>> with xr.set_options(display_width=40):
    ...     print(ds)
    <xarray.Dataset>
    Dimensions:  (x: 1000)
    Coordinates:
      * x        (x) int64 0 1 2 3 4 5 6 ...
    Data variables:
        *empty*

    Or to set global options:

    >>> xr.set_options(display_width=80)
    cKstj�|_tj|�dS)N)�OPTIONS�copy�old�update)�self�kwargs�r	�3/tmp/pip-build-5_djhm0z/xray/xarray/core/options.py�__init__s
zset_options.__init__cCsdS)Nr	)rr	r	r
�	__enter__szset_options.__enter__cCstj�tj|j�dS)N)r�clearrr)r�type�value�	tracebackr	r	r
�__exit__!szset_options.__exit__N)�__name__�
__module__�__qualname__�__doc__rrrr	r	r	r
rsrN)r�objectrr	r	r	r
�<module>s