Skip to content

Commit d5cc3b4

Browse files
committed
Merge branch 'main' into explicit-indexes-variables
2 parents f1535a3 + c4f3a9e commit d5cc3b4

40 files changed

+236
-106
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
- id: isort
1414
# https://github.com/python/black#version-control-integration
1515
- repo: https://github.com/psf/black
16-
rev: 21.7b0
16+
rev: 21.8b0
1717
hooks:
1818
- id: black
1919
- repo: https://github.com/keewis/blackdoc

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ to support our efforts.
105105
History
106106
-------
107107

108-
xarray is an evolution of an internal tool developed at `The Climate
108+
Xarray is an evolution of an internal tool developed at `The Climate
109109
Corporation`__. It was originally written by Climate Corp researchers Stephan
110110
Hoyer, Alex Kleeman and Eugene Brevdo and was released as open source in
111111
May 2014. The project was renamed from "xray" in January 2016. Xarray became a
@@ -131,16 +131,16 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
131131
See the License for the specific language governing permissions and
132132
limitations under the License.
133133

134-
xarray bundles portions of pandas, NumPy and Seaborn, all of which are available
134+
Xarray bundles portions of pandas, NumPy and Seaborn, all of which are available
135135
under a "3-clause BSD" license:
136136
- pandas: setup.py, xarray/util/print_versions.py
137137
- NumPy: xarray/core/npcompat.py
138138
- Seaborn: _determine_cmap_params in xarray/core/plot/utils.py
139139

140-
xarray also bundles portions of CPython, which is available under the "Python
140+
Xarray also bundles portions of CPython, which is available under the "Python
141141
Software Foundation License" in xarray/core/pycompat.py.
142142

143-
xarray uses icons from the icomoon package (free version), which is
143+
Xarray uses icons from the icomoon package (free version), which is
144144
available under the "CC BY 4.0" license.
145145

146146
The full text of these licenses are included in the licenses directory.

doc/api.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Top-level functions
3535
map_blocks
3636
show_versions
3737
set_options
38+
get_options
3839
unify_chunks
3940

4041
Dataset
@@ -598,8 +599,8 @@ Universal functions
598599

599600
.. warning::
600601

601-
With recent versions of numpy, dask and xarray, NumPy ufuncs are now
602-
supported directly on all xarray and dask objects. This obviates the need
602+
With recent versions of NumPy, Dask and xarray, NumPy ufuncs are now
603+
supported directly on all xarray and Dask objects. This obviates the need
603604
for the ``xarray.ufuncs`` module, which should not be used for new code
604605
unless compatibility with versions of NumPy prior to v1.13 is
605606
required. They will be removed once support for NumPy prior to

doc/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ Some other important things to know about the docs:
257257
tutorial-like overviews per topic together with some other information
258258
(what's new, installation, etc).
259259

260-
- The docstrings follow the **Numpy Docstring Standard**, which is used widely
260+
- The docstrings follow the **NumPy Docstring Standard**, which is used widely
261261
in the Scientific Python community. This standard specifies the format of
262262
the different sections of the docstring. See `this document
263263
<https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard>`_

doc/examples/ERA5-GRIB-example.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"GRIB format is commonly used to disseminate atmospheric model data. With Xarray and the cfgrib engine, GRIB data can easily be analyzed and visualized."
14+
"GRIB format is commonly used to disseminate atmospheric model data. With xarray and the cfgrib engine, GRIB data can easily be analyzed and visualized."
1515
]
1616
},
1717
{

doc/examples/multidimensional-coords.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
"source": [
185185
"The resulting coordinate for the `groupby_bins` operation got the `_bins` suffix appended: `xc_bins`. This help us distinguish it from the original multidimensional variable `xc`.\n",
186186
"\n",
187-
"**Note**: This group-by-latitude approach does not take into account the finite-size geometry of grid cells. It simply bins each value according to the coordinates at the cell center. Xarray has no understanding of grid cells and their geometry. More precise geographic regridding for Xarray data is available via the [xesmf](https://xesmf.readthedocs.io) package."
187+
"**Note**: This group-by-latitude approach does not take into account the finite-size geometry of grid cells. It simply bins each value according to the coordinates at the cell center. Xarray has no understanding of grid cells and their geometry. More precise geographic regridding for xarray data is available via the [xesmf](https://xesmf.readthedocs.io) package."
188188
]
189189
},
190190
{

doc/examples/visualization_gallery.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Visualization Gallery\n",
88
"\n",
9-
"This notebook shows common visualization issues encountered in Xarray."
9+
"This notebook shows common visualization issues encountered in xarray."
1010
]
1111
},
1212
{

doc/getting-started-guide/faq.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ rows) shouldn't really matter. For example, the images of a movie can be
5555
natively represented as an array with four dimensions: time, row, column and
5656
color.
5757

58-
Pandas has historically supported N-dimensional panels, but deprecated them in
59-
version 0.20 in favor of Xarray data structures. There are now built-in methods
60-
on both sides to convert between pandas and Xarray, allowing for more focused
58+
pandas has historically supported N-dimensional panels, but deprecated them in
59+
version 0.20 in favor of xarray data structures. There are now built-in methods
60+
on both sides to convert between pandas and xarray, allowing for more focused
6161
development effort. Xarray objects have a much richer model of dimensionality -
6262
if you were using Panels:
6363

@@ -72,8 +72,8 @@ if you were using Panels:
7272
In contrast, this sort of data structure fits very naturally in an
7373
xarray ``Dataset``.
7474

75-
You can :ref:`read about switching from Panels to Xarray here <panel transition>`.
76-
Pandas gets a lot of things right, but many science, engineering and complex
75+
You can :ref:`read about switching from Panels to xarray here <panel transition>`.
76+
pandas gets a lot of things right, but many science, engineering and complex
7777
analytics use cases need fully multi-dimensional data structures.
7878

7979
How do xarray data structures differ from those found in pandas?
@@ -92,7 +92,7 @@ of the "time" dimension. You never need to reshape arrays (e.g., with
9292
Why don't aggregations return Python scalars?
9393
---------------------------------------------
9494

95-
xarray tries hard to be self-consistent: operations on a ``DataArray`` (resp.
95+
Xarray tries hard to be self-consistent: operations on a ``DataArray`` (resp.
9696
``Dataset``) return another ``DataArray`` (resp. ``Dataset``) object. In
9797
particular, operations returning scalar values (e.g. indexing or aggregations
9898
like ``mean`` or ``sum`` applied to all axes) will also return xarray objects.
@@ -152,7 +152,7 @@ What other netCDF related Python libraries should I know about?
152152

153153
`netCDF4-python`__ provides a lower level interface for working with
154154
netCDF and OpenDAP datasets in Python. We use netCDF4-python internally in
155-
xarray, and have contributed a number of improvements and fixes upstream. xarray
155+
xarray, and have contributed a number of improvements and fixes upstream. Xarray
156156
does not yet support all of netCDF4-python's features, such as modifying files
157157
on-disk.
158158

@@ -161,7 +161,7 @@ __ https://github.com/Unidata/netcdf4-python
161161
Iris_ (supported by the UK Met office) provides similar tools for in-
162162
memory manipulation of labeled arrays, aimed specifically at weather and
163163
climate data needs. Indeed, the Iris :py:class:`~iris.cube.Cube` was direct
164-
inspiration for xarray's :py:class:`~xarray.DataArray`. xarray and Iris take very
164+
inspiration for xarray's :py:class:`~xarray.DataArray`. Xarray and Iris take very
165165
different approaches to handling metadata: Iris strictly interprets
166166
`CF conventions`_. Iris particularly shines at mapping, thanks to its
167167
integration with Cartopy_.

doc/getting-started-guide/installing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Alternative data containers
8787

8888
Minimum dependency versions
8989
---------------------------
90-
xarray adopts a rolling policy regarding the minimum supported version of its
90+
Xarray adopts a rolling policy regarding the minimum supported version of its
9191
dependencies:
9292

9393
- **Python:** 24 months
@@ -110,7 +110,7 @@ You can see the actual minimum tested versions:
110110
Instructions
111111
------------
112112

113-
xarray itself is a pure Python package, but its dependencies are not. The
113+
Xarray itself is a pure Python package, but its dependencies are not. The
114114
easiest way to get everything installed is to use conda_. To install xarray
115115
with its recommended dependencies using the conda command line tool::
116116

doc/getting-started-guide/quick-overview.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Here are the key properties for a ``DataArray``:
4646
Indexing
4747
--------
4848

49-
xarray supports four kinds of indexing. Since we have assigned coordinate labels to the x dimension we can use label-based indexing along that dimension just like pandas. The four examples below all yield the same result (the value at `x=10`) but at varying levels of convenience and intuitiveness.
49+
Xarray supports four kinds of indexing. Since we have assigned coordinate labels to the x dimension we can use label-based indexing along that dimension just like pandas. The four examples below all yield the same result (the value at `x=10`) but at varying levels of convenience and intuitiveness.
5050

5151
.. ipython:: python
5252
@@ -133,7 +133,7 @@ For more, see :ref:`comput`.
133133
GroupBy
134134
-------
135135

136-
xarray supports grouped operations using a very similar API to pandas (see :ref:`groupby`):
136+
Xarray supports grouped operations using a very similar API to pandas (see :ref:`groupby`):
137137

138138
.. ipython:: python
139139
@@ -225,4 +225,4 @@ You can directly read and write xarray objects to disk using :py:meth:`~xarray.D
225225
os.remove("example.nc")
226226
227227
228-
It is common for datasets to be distributed across multiple files (commonly one file per timestep). xarray supports this use-case by providing the :py:meth:`~xarray.open_mfdataset` and the :py:meth:`~xarray.save_mfdataset` methods. For more, see :ref:`io`.
228+
It is common for datasets to be distributed across multiple files (commonly one file per timestep). Xarray supports this use-case by providing the :py:meth:`~xarray.open_mfdataset` and the :py:meth:`~xarray.save_mfdataset` methods. For more, see :ref:`io`.

0 commit comments

Comments
 (0)