Skip to content

Commit f045401

Browse files
Fix typos found by codespell (#6794)
1 parent e086015 commit f045401

13 files changed

+15
-15
lines changed

doc/user-guide/io.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ Chunk sizes may be specified in one of three ways when writing to a zarr store:
790790
The resulting chunks will be determined based on the order of the above list; dask
791791
chunks will be overridden by manually-specified chunks in the encoding argument,
792792
and the presence of either dask chunks or chunks in the ``encoding`` attribute will
793-
supercede the default chunking heuristics in zarr.
793+
supersede the default chunking heuristics in zarr.
794794

795795
Importantly, this logic applies to every array in the zarr store individually,
796796
including coordinate arrays. Therefore, if a dataset contains one or more dask

doc/user-guide/plotting.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ Faceting here refers to splitting an array along one or two dimensions and
585585
plotting each group.
586586
Xarray's basic plotting is useful for plotting two dimensional arrays. What
587587
about three or four dimensional arrays? That's where facets become helpful.
588-
The general approach to plotting here is called “small multiples”, where the same kind of plot is repeated multiple times, and the specific use of small multiples to display the same relationship conditioned on one ore more other variables is often called a “trellis plot”.
588+
The general approach to plotting here is called “small multiples”, where the same kind of plot is repeated multiple times, and the specific use of small multiples to display the same relationship conditioned on one or more other variables is often called a “trellis plot”.
589589

590590
Consider the temperature data set. There are 4 observations per day for two
591591
years which makes for 2920 values along the time dimension.

xarray/coding/calendar_ops.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def convert_calendar(
9898
Notes
9999
-----
100100
Passing a value to `missing` is only usable if the source's time coordinate as an
101-
inferrable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
101+
inferable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
102102
if the target coordinate, generated from this frequency, has dates equivalent to the
103103
source. It is usually **not** appropriate to use this mode with:
104104

xarray/coding/cftime_offsets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ def date_range_like(source, calendar, use_cftime=None):
12001200
freq = infer_freq(source)
12011201
if freq is None:
12021202
raise ValueError(
1203-
"`date_range_like` was unable to generate a range as the source frequency was not inferrable."
1203+
"`date_range_like` was unable to generate a range as the source frequency was not inferable."
12041204
)
12051205

12061206
use_cftime = _should_cftime_be_used(source, calendar, use_cftime)

xarray/core/alignment.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def find_matching_unindexed_dims(self) -> None:
285285
self.unindexed_dim_sizes = unindexed_dim_sizes
286286

287287
def assert_no_index_conflict(self) -> None:
288-
"""Check for uniqueness of both coordinate and dimension names accross all sets
288+
"""Check for uniqueness of both coordinate and dimension names across all sets
289289
of matching indexes.
290290
291291
We need to make sure that all indexes used for re-indexing or alignment

xarray/core/concat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ def ensure_common_dims(vars):
535535

536536
# get the indexes to concatenate together, create a PandasIndex
537537
# for any scalar coordinate variable found with ``name`` matching ``dim``.
538-
# TODO: depreciate concat a mix of scalar and dimensional indexed coodinates?
538+
# TODO: depreciate concat a mix of scalar and dimensional indexed coordinates?
539539
# TODO: (benbovy - explicit indexes): check index types and/or coordinates
540540
# of all datasets?
541541
def get_indexes(name):

xarray/core/dataarray.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5215,7 +5215,7 @@ def convert_calendar(
52155215
Notes
52165216
-----
52175217
Passing a value to `missing` is only usable if the source's time coordinate as an
5218-
inferrable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
5218+
inferable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
52195219
if the target coordinate, generated from this frequency, has dates equivalent to the
52205220
source. It is usually **not** appropriate to use this mode with:
52215221

xarray/core/dataset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8464,7 +8464,7 @@ def convert_calendar(
84648464
Notes
84658465
-----
84668466
Passing a value to `missing` is only usable if the source's time coordinate as an
8467-
inferrable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
8467+
inferable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
84688468
if the target coordinate, generated from this frequency, has dates equivalent to the
84698469
source. It is usually **not** appropriate to use this mode with:
84708470

xarray/core/indexes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ def create_default_index_implicit(
958958
959959
Create a PandasMultiIndex if the given variable wraps a pandas.MultiIndex,
960960
otherwise create a PandasIndex (note that this will become obsolete once we
961-
depreciate implcitly passing a pandas.MultiIndex as a coordinate).
961+
depreciate implicitly passing a pandas.MultiIndex as a coordinate).
962962
963963
"""
964964
if all_variables is None:

xarray/core/rolling.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ def __init__(
834834
multiple of window size. If 'trim', the excess indexes are trimmed.
835835
If 'pad', NA will be padded.
836836
side : 'left' or 'right' or mapping from dimension to 'left' or 'right'
837-
coord_func : function (name) or mapping from coordinate name to funcion (name).
837+
coord_func : function (name) or mapping from coordinate name to function (name).
838838
839839
Returns
840840
-------

xarray/tests/test_cftime_offsets.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1358,11 +1358,11 @@ def test_date_range_like_same_calendar():
13581358

13591359
def test_date_range_like_errors():
13601360
src = date_range("1899-02-03", periods=20, freq="D", use_cftime=False)
1361-
src = src[np.arange(20) != 10] # Remove 1 day so the frequency is not inferrable.
1361+
src = src[np.arange(20) != 10] # Remove 1 day so the frequency is not inferable.
13621362

13631363
with pytest.raises(
13641364
ValueError,
1365-
match="`date_range_like` was unable to generate a range as the source frequency was not inferrable.",
1365+
match="`date_range_like` was unable to generate a range as the source frequency was not inferable.",
13661366
):
13671367
date_range_like(src, "gregorian")
13681368

xarray/tests/test_dataset.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2834,7 +2834,7 @@ def test_rename_dims(self) -> None:
28342834
{"x": ("x_new", [0, 1, 2]), "y": ("x_new", [10, 11, 12]), "z": 42}
28352835
)
28362836
# TODO: (benbovy - explicit indexes) update when set_index supports
2837-
# seeting index for non-dimension variables
2837+
# setting index for non-dimension variables
28382838
expected = expected.set_coords("x")
28392839
actual = original.rename_dims({"x": "x_new"})
28402840
assert_identical(expected, actual, check_default_indexes=False)
@@ -2855,7 +2855,7 @@ def test_rename_vars(self) -> None:
28552855
{"x_new": ("x", [0, 1, 2]), "y": ("x", [10, 11, 12]), "z": 42}
28562856
)
28572857
# TODO: (benbovy - explicit indexes) update when set_index supports
2858-
# seeting index for non-dimension variables
2858+
# setting index for non-dimension variables
28592859
expected = expected.set_coords("x_new")
28602860
actual = original.rename_vars({"x": "x_new"})
28612861
assert_identical(expected, actual, check_default_indexes=False)

xarray/tests/test_groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ def test_groupby_keep_attrs(self, keep_attrs):
11751175
with xr.set_options(use_flox=True):
11761176
actual = array.groupby("abc").mean(keep_attrs=keep_attrs)
11771177

1178-
# values are tested elsewhere, here we jsut check data
1178+
# values are tested elsewhere, here we just check data
11791179
# TODO: add check_attrs kwarg to assert_allclose
11801180
actual.data = expected.data
11811181
assert_identical(expected, actual)

0 commit comments

Comments
 (0)