# xarray.set_options

class `xarray.``set_options`(**kwargs)

  Set options for xarray in a controlled context.

  Currently supported options:

  - `display_width`: maximum display width for `repr` on xarray objects. Default: `80`.
  - `arithmetic_join`: DataArray/Dataset alignment in binary operations. Default: `'inner'`.

  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)

  `__init__`(**kwargs)

  Methods

  `__init__`(**kwargs) |