forked from pydata/xarray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better documentation of options (pydata#6723)
- Loading branch information
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.. currentmodule:: xarray | ||
|
||
.. _options: | ||
|
||
Configuration | ||
============= | ||
|
||
Xarray offers a small number of configuration options through :py:func:`set_options`. With these, you can | ||
|
||
1. Control the ``repr``: | ||
|
||
- ``display_expand_attrs`` | ||
- ``display_expand_coords`` | ||
- ``display_expand_data`` | ||
- ``display_expand_data_vars`` | ||
- ``display_max_rows`` | ||
- ``display_style`` | ||
|
||
2. Control behaviour during operations: ``arithmetic_join``, ``keep_attrs``, ``use_bottleneck``. | ||
3. Control colormaps for plots:``cmap_divergent``, ``cmap_sequential``. | ||
4. Aspects of file reading: ``file_cache_maxsize``, ``warn_on_unclosed_files``. | ||
|
||
|
||
You can set these options either globally | ||
|
||
:: | ||
|
||
xr.set_options(arithmetic_join="exact") | ||
|
||
or locally as a context manager: | ||
|
||
:: | ||
|
||
with xr.set_options(arithmetic_join="exact"): | ||
# do operation here | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters