Skip to content

Commit a0d24af

Browse files
Fix typos found by codespell
1 parent a26c816 commit a0d24af

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

DATATREE_MIGRATION_GUIDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ A number of other API changes have been made, which should only require minor mo
4141
- The method `DataTree.to_dataset()` still exists but now has different options for controlling which variables are present on the resulting `Dataset`, e.g. `inherit=True/False`.
4242
- `DataTree.copy()` also has a new `inherit` keyword argument for controlling whether or not coordinates defined on parents are copied (only relevant when copying a non-root node).
4343
- The `DataTree.parent` property is now read-only. To assign a ancestral relationships directly you must instead use the `.children` property on the parent node, which remains settable.
44-
- Similarly the `parent` kwarg has been removed from the `DataTree.__init__` constuctor.
44+
- Similarly the `parent` kwarg has been removed from the `DataTree.__init__` constructor.
4545
- DataTree objects passed to the `children` kwarg in `DataTree.__init__` are now shallow-copied.
4646
- `DataTree.as_array` has been replaced by `DataTree.to_dataarray`.
4747
- A number of methods which were not well tested have been (temporarily) disabled. In general we have tried to only keep things that are known to work, with the plan to increase API surface incrementally after release.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ contain another two subgroups, named ``fine`` and ``coarse``.
274274
The (sub)subgroups ``fine`` and ``coarse`` contain two very similar datasets. They both have an ``"x"``
275275
dimension, but the dimension is of different lengths in each group, which makes the data in each group
276276
unalignable. In the root group we placed some completely unrelated information, in order to show how a tree can
277-
store heterogenous data.
277+
store heterogeneous data.
278278

279279
Remember to keep unalignable dimensions in sibling groups because a DataTree inherits coordinates down through its
280280
child nodes. You can see this inheritance in the above representation of the DataTree. The coordinates

doc/user-guide/data-structures.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ We have created a tree with three nodes in it:
609609
610610
611611
Consistency checks are enforced. For instance, if we try to create a `cycle`,
612-
where the root node is also a child of a decendent, the constructor will raise
612+
where the root node is also a child of a descendant, the constructor will raise
613613
an (:py:class:`~xarray.InvalidTreeError`):
614614

615615
.. ipython:: python
@@ -711,8 +711,8 @@ inherited dimensions, but DataTree's inheritance is slightly stricter yet
711711
easier to reason about.
712712

713713
The constraint that this puts on a DataTree is that dimensions and indices that
714-
are inherited must be aligned with any direct decendent node's existing
715-
dimension or index. This allows decendents to use dimensions defined in
714+
are inherited must be aligned with any direct descendant node's existing
715+
dimension or index. This allows descendants to use dimensions defined in
716716
ancestor nodes, without duplicating that information. But as a consequence, if
717717
a dimension-name is defined in on a node and that same dimension-name
718718
exists in one of its ancestors, they must align (have the same index and

doc/user-guide/hierarchical-data.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Examples of data which one might want organise in a grouped or hierarchical mann
2828
- Observational data about the same system but from multiple different types of sensors,
2929
- Mixed experimental and theoretical data,
3030
- A systematic study recording the same experiment but with different parameters,
31-
- Heterogenous data, such as demographic and metereological data,
31+
- Heterogeneous data, such as demographic and metereological data,
3232

3333
or even any combination of the above.
3434

@@ -177,7 +177,7 @@ Let's use a different example of a tree to discuss more complex relationships be
177177
"/Bony Skeleton/Four Limbs/Amniotic Egg/Two Fenestrae/Dinosaurs"
178178
]
179179
180-
We have used the :py:meth:`~xarray.DataTree.from_dict` constructor method as a prefered way to quickly create a whole tree,
180+
We have used the :py:meth:`~xarray.DataTree.from_dict` constructor method as a preferred way to quickly create a whole tree,
181181
and :ref:`filesystem paths` (to be explained shortly) to select two nodes of interest.
182182

183183
.. ipython:: python
@@ -703,7 +703,7 @@ Data Alignment
703703
~~~~~~~~~~~~~~
704704

705705
The data in different datatree nodes are not totally independent. In particular dimensions (and indexes) in child nodes must be exactly aligned with those in their parent nodes.
706-
Exact aligment means that shared dimensions must be the same length, and indexes along those dimensions must be equal.
706+
Exact alignment means that shared dimensions must be the same length, and indexes along those dimensions must be equal.
707707

708708
.. note::
709709
If you were a previous user of the prototype `xarray-contrib/datatree <https://github.com/xarray-contrib/datatree>`_ package, this is different from what you're used to!

xarray/backends/zarr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1718,7 +1718,7 @@ def _get_open_params(
17181718
# for new data, we use a better default
17191719
use_zarr_fill_value_as_mask = False
17201720
else:
1721-
# this was the default for v2 and shold apply to most existing Zarr data
1721+
# this was the default for v2 and should apply to most existing Zarr data
17221722
use_zarr_fill_value_as_mask = True
17231723
return (
17241724
zarr_group,

xarray/core/groupby.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ def _flox_reduce(
10031003
# Note that `has_missing_groups=False` when `self._by_chunked is True`.
10041004
# We *choose* to always do the masking, so that behaviour is predictable
10051005
# in some way. The real solution is to expose fill_value as a kwarg,
1006-
# and set appopriate defaults :/.
1006+
# and set appropriate defaults :/.
10071007
kwargs.setdefault("fill_value", np.nan)
10081008
kwargs.setdefault("min_count", 1)
10091009

xarray/plot/dataset_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def streamplot(
652652

653653
def _update_doc_to_dataset(dataarray_plotfunc: Callable) -> Callable[[F], F]:
654654
"""
655-
Add a common docstring by re-using the DataArray one.
655+
Add a common docstring by reusing the DataArray one.
656656
657657
TODO: Reduce code duplication.
658658

xarray/tests/test_interp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def test_interpolate_nd(case: int, method: InterpnOptions, nd_interp_coords) ->
305305
ydestnp = nd_interp_coords["ydestnp"]
306306
zdestnp = nd_interp_coords["zdestnp"]
307307
grid_grid_points = nd_interp_coords["grid_grid_points"]
308-
# the presence/absence of z cordinate may affect nd interpolants, even when the
308+
# the presence/absence of z coordinate may affect nd interpolants, even when the
309309
# coordinate is unchanged
310310
actual = da.interp(x=xdestnp, y=ydestnp, z=zdestnp, method=method)
311311
expected_data = scipy.interpolate.interpn(

xarray/tests/test_plot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3279,7 +3279,7 @@ def test_maybe_gca() -> None:
32793279
existing_axes = plt.axes()
32803280
ax = _maybe_gca(aspect=1)
32813281

3282-
# re-uses the existing axes
3282+
# reuses the existing axes
32833283
assert existing_axes == ax
32843284
# kwargs are ignored when reusing axes
32853285
assert ax.get_aspect() == "auto"

0 commit comments

Comments
 (0)