�
���hc � �* � d diZ G d� de� � ZdS )�
display_width�P c �$ � e Zd ZdZd� Zd� Zd� 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)
c �v � t � � � | _ t � |� � d S �N)�OPTIONS�copy�old�update)�self�kwargss �H/opt/cloudlinux/venv/lib/python3.11/site-packages/xarray/core/options.py�__init__zset_options.__init__ s) � ��<�<�>�>������v������ c � � d S r � )r s r � __enter__zset_options.__enter__ s � ��r c �v � t � � � t � | j � � d S r )r �clearr r
)r �type�value� tracebacks r �__exit__zset_options.__exit__! s) � ��
�
�������t�x� � � � � r N)�__name__�
__module__�__qualname__�__doc__r r r r r r r r sK � � � � � �� �*� � �� � �!� !� !� !� !r r N)r �objectr r r r �<module>r sC ���B�
��!� !� !� !� !�&� !� !� !� !� !r |