From a5918c3d47dad74589cd227c55423dcd0c6d1575 Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Fri, 27 Oct 2023 15:18:48 -0700 Subject: [PATCH] update docs --- doc/api-hidden.rst | 59 +++++++++++++++++++++++----------------------- doc/whats-new.rst | 12 +++++----- xarray/__init__.py | 2 ++ 3 files changed, 38 insertions(+), 35 deletions(-) diff --git a/doc/api-hidden.rst b/doc/api-hidden.rst index b4aaf617d5e..a661dcdc41d 100644 --- a/doc/api-hidden.rst +++ b/doc/api-hidden.rst @@ -208,7 +208,6 @@ Variable.argsort Variable.astype Variable.broadcast_equals - Variable.broadcast_to Variable.chunk Variable.clip Variable.coarsen @@ -221,7 +220,6 @@ Variable.cumprod Variable.cumsum Variable.equals - Variable.set_dims Variable.fillna Variable.get_axis_num Variable.identical @@ -244,6 +242,7 @@ Variable.rolling_window Variable.round Variable.searchsorted + Variable.set_dims Variable.shift Variable.squeeze Variable.stack @@ -353,33 +352,35 @@ IndexVariable.values - namedarray.core.NamedArray.all - namedarray.core.NamedArray.any - namedarray.core.NamedArray.attrs - namedarray.core.NamedArray.chunks - namedarray.core.NamedArray.chunksizes - namedarray.core.NamedArray.copy - namedarray.core.NamedArray.count - namedarray.core.NamedArray.cumprod - namedarray.core.NamedArray.cumsum - namedarray.core.NamedArray.data - namedarray.core.NamedArray.dims - namedarray.core.NamedArray.dtype - namedarray.core.NamedArray.get_axis_num - namedarray.core.NamedArray.max - namedarray.core.NamedArray.mean - namedarray.core.NamedArray.median - namedarray.core.NamedArray.min - namedarray.core.NamedArray.nbytes - namedarray.core.NamedArray.ndim - namedarray.core.NamedArray.prod - namedarray.core.NamedArray.reduce - namedarray.core.NamedArray.shape - namedarray.core.NamedArray.size - namedarray.core.NamedArray.sizes - namedarray.core.NamedArray.std - namedarray.core.NamedArray.sum - namedarray.core.NamedArray.var + NamedArray.all + NamedArray.any + NamedArray.attrs + NamedArray.broadcast_to + NamedArray.chunks + NamedArray.chunksizes + NamedArray.copy + NamedArray.count + NamedArray.cumprod + NamedArray.cumsum + NamedArray.data + NamedArray.dims + NamedArray.dtype + NamedArray.expand_dims + NamedArray.get_axis_num + NamedArray.max + NamedArray.mean + NamedArray.median + NamedArray.min + NamedArray.nbytes + NamedArray.ndim + NamedArray.prod + NamedArray.reduce + NamedArray.shape + NamedArray.size + NamedArray.sizes + NamedArray.std + NamedArray.sum + NamedArray.var plot.plot diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 09298fa26df..7d2c554250e 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -26,11 +26,11 @@ New Features (:pull:`8380`) By `Anderson Banihirwe `_. + Breaking changes ~~~~~~~~~~~~~~~~ - Deprecations ~~~~~~~~~~~~ @@ -352,7 +352,7 @@ Documentation - Added page on the internal design of xarray objects. (:pull:`7991`) By `Tom Nicholas `_. - Added examples to docstrings of :py:meth:`Dataset.assign_attrs`, :py:meth:`Dataset.broadcast_equals`, - :py:meth:`Dataset.equals`, :py:meth:`Dataset.identical`, :py:meth:`Dataset.set_dims`,:py:meth:`Dataset.drop_vars` + :py:meth:`Dataset.equals`, :py:meth:`Dataset.identical`, :py:meth:`Dataset.expand_dims`,:py:meth:`Dataset.drop_vars` (:issue:`6793`, :pull:`7937`) By `Harshitha `_. - Add docstrings for the :py:class:`Index` base class and add some documentation on how to create custom, Xarray-compatible indexes (:pull:`6975`) @@ -397,7 +397,7 @@ Documentation ~~~~~~~~~~~~~ - Added examples to docstrings of :py:meth:`Dataset.assign_attrs`, :py:meth:`Dataset.broadcast_equals`, - :py:meth:`Dataset.equals`, :py:meth:`Dataset.identical`, :py:meth:`Dataset.set_dims`,:py:meth:`Dataset.drop_vars` + :py:meth:`Dataset.equals`, :py:meth:`Dataset.identical`, :py:meth:`Dataset.expand_dims`,:py:meth:`Dataset.drop_vars` (:issue:`6793`, :pull:`7937`) By `Harshitha `_. - Added page on wrapping chunked numpy-like arrays as alternatives to dask arrays. (:pull:`7951`) By `Tom Nicholas `_. @@ -1129,7 +1129,7 @@ Documentation By `Zach Moon `_. - Raise a more informative error when trying to open a non-existent zarr store. (:issue:`6484`, :pull:`7060`) By `Sam Levang `_. -- Added examples to docstrings for :py:meth:`DataArray.set_dims`, :py:meth:`DataArray.drop_duplicates`, :py:meth:`DataArray.reset_coords`, :py:meth:`DataArray.equals`, :py:meth:`DataArray.identical`, :py:meth:`DataArray.broadcast_equals`, :py:meth:`DataArray.bfill`, :py:meth:`DataArray.ffill`, :py:meth:`DataArray.fillna`, :py:meth:`DataArray.dropna`, :py:meth:`DataArray.drop_isel`, :py:meth:`DataArray.drop_sel`, :py:meth:`DataArray.head`, :py:meth:`DataArray.tail`. (:issue:`5816`, :pull:`7088`) +- Added examples to docstrings for :py:meth:`DataArray.expand_dims`, :py:meth:`DataArray.drop_duplicates`, :py:meth:`DataArray.reset_coords`, :py:meth:`DataArray.equals`, :py:meth:`DataArray.identical`, :py:meth:`DataArray.broadcast_equals`, :py:meth:`DataArray.bfill`, :py:meth:`DataArray.ffill`, :py:meth:`DataArray.fillna`, :py:meth:`DataArray.dropna`, :py:meth:`DataArray.drop_isel`, :py:meth:`DataArray.drop_sel`, :py:meth:`DataArray.head`, :py:meth:`DataArray.tail`. (:issue:`5816`, :pull:`7088`) By `Patrick Naylor `_. - Add missing docstrings to various array properties. (:pull:`7090`) By `Tom Nicholas `_. @@ -3641,7 +3641,7 @@ Bug fixes - Fix regression introduced in v0.12.2 where ``copy(deep=True)`` would convert unicode indices to dtype=object (:issue:`3094`). By `Guido Imperiale `_. -- Improved error handling and documentation for `.set_dims()` +- Improved error handling and documentation for `.expand_dims()` read-only view. - Fix tests for big-endian systems (:issue:`3125`). By `Graham Inggs `_. @@ -5465,7 +5465,7 @@ Enhancements enable persisting data in distributed memory when using Dask (:issue:`1344`). By `Matthew Rocklin `_. -- New :py:meth:`~xarray.DataArray.set_dims` method for ``DataArray`` and +- New :py:meth:`~xarray.DataArray.expand_dims` method for ``DataArray`` and ``Dataset`` (:issue:`1326`). By `Keisuke Fujii `_. diff --git a/xarray/__init__.py b/xarray/__init__.py index 1fd3b0c4336..91613e8cbbc 100644 --- a/xarray/__init__.py +++ b/xarray/__init__.py @@ -41,6 +41,7 @@ from xarray.core.options import get_options, set_options from xarray.core.parallel import map_blocks from xarray.core.variable import IndexVariable, Variable, as_variable +from xarray.namedarray.core import NamedArray from xarray.util.print_versions import show_versions try: @@ -104,6 +105,7 @@ "IndexSelResult", "IndexVariable", "Variable", + "NamedArray", # Exceptions "MergeError", "SerializationWarning",