Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos found by codespell #6794

Merged
merged 1 commit into from
Jul 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/user-guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ Chunk sizes may be specified in one of three ways when writing to a zarr store:
The resulting chunks will be determined based on the order of the above list; dask
chunks will be overridden by manually-specified chunks in the encoding argument,
and the presence of either dask chunks or chunks in the ``encoding`` attribute will
supercede the default chunking heuristics in zarr.
supersede the default chunking heuristics in zarr.

Importantly, this logic applies to every array in the zarr store individually,
including coordinate arrays. Therefore, if a dataset contains one or more dask
Expand Down
2 changes: 1 addition & 1 deletion doc/user-guide/plotting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ Faceting here refers to splitting an array along one or two dimensions and
plotting each group.
Xarray's basic plotting is useful for plotting two dimensional arrays. What
about three or four dimensional arrays? That's where facets become helpful.
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”.
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”.

Consider the temperature data set. There are 4 observations per day for two
years which makes for 2920 values along the time dimension.
Expand Down
2 changes: 1 addition & 1 deletion xarray/coding/calendar_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def convert_calendar(
Notes
-----
Passing a value to `missing` is only usable if the source's time coordinate as an
inferrable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
inferable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
if the target coordinate, generated from this frequency, has dates equivalent to the
source. It is usually **not** appropriate to use this mode with:

Expand Down
2 changes: 1 addition & 1 deletion xarray/coding/cftime_offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ def date_range_like(source, calendar, use_cftime=None):
freq = infer_freq(source)
if freq is None:
raise ValueError(
"`date_range_like` was unable to generate a range as the source frequency was not inferrable."
"`date_range_like` was unable to generate a range as the source frequency was not inferable."
)

use_cftime = _should_cftime_be_used(source, calendar, use_cftime)
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def find_matching_unindexed_dims(self) -> None:
self.unindexed_dim_sizes = unindexed_dim_sizes

def assert_no_index_conflict(self) -> None:
"""Check for uniqueness of both coordinate and dimension names accross all sets
"""Check for uniqueness of both coordinate and dimension names across all sets
of matching indexes.

We need to make sure that all indexes used for re-indexing or alignment
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def ensure_common_dims(vars):

# get the indexes to concatenate together, create a PandasIndex
# for any scalar coordinate variable found with ``name`` matching ``dim``.
# TODO: depreciate concat a mix of scalar and dimensional indexed coodinates?
# TODO: depreciate concat a mix of scalar and dimensional indexed coordinates?
# TODO: (benbovy - explicit indexes): check index types and/or coordinates
# of all datasets?
def get_indexes(name):
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -5215,7 +5215,7 @@ def convert_calendar(
Notes
-----
Passing a value to `missing` is only usable if the source's time coordinate as an
inferrable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
inferable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
if the target coordinate, generated from this frequency, has dates equivalent to the
source. It is usually **not** appropriate to use this mode with:

Expand Down
2 changes: 1 addition & 1 deletion xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -8464,7 +8464,7 @@ def convert_calendar(
Notes
-----
Passing a value to `missing` is only usable if the source's time coordinate as an
inferrable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
inferable frequencies (see :py:func:`~xarray.infer_freq`) and is only appropriate
if the target coordinate, generated from this frequency, has dates equivalent to the
source. It is usually **not** appropriate to use this mode with:

Expand Down
2 changes: 1 addition & 1 deletion xarray/core/indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ def create_default_index_implicit(

Create a PandasMultiIndex if the given variable wraps a pandas.MultiIndex,
otherwise create a PandasIndex (note that this will become obsolete once we
depreciate implcitly passing a pandas.MultiIndex as a coordinate).
depreciate implicitly passing a pandas.MultiIndex as a coordinate).

"""
if all_variables is None:
Expand Down
2 changes: 1 addition & 1 deletion xarray/core/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ def __init__(
multiple of window size. If 'trim', the excess indexes are trimmed.
If 'pad', NA will be padded.
side : 'left' or 'right' or mapping from dimension to 'left' or 'right'
coord_func : function (name) or mapping from coordinate name to funcion (name).
coord_func : function (name) or mapping from coordinate name to function (name).

Returns
-------
Expand Down
4 changes: 2 additions & 2 deletions xarray/tests/test_cftime_offsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -1358,11 +1358,11 @@ def test_date_range_like_same_calendar():

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

with pytest.raises(
ValueError,
match="`date_range_like` was unable to generate a range as the source frequency was not inferrable.",
match="`date_range_like` was unable to generate a range as the source frequency was not inferable.",
):
date_range_like(src, "gregorian")

Expand Down
4 changes: 2 additions & 2 deletions xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2834,7 +2834,7 @@ def test_rename_dims(self) -> None:
{"x": ("x_new", [0, 1, 2]), "y": ("x_new", [10, 11, 12]), "z": 42}
)
# TODO: (benbovy - explicit indexes) update when set_index supports
# seeting index for non-dimension variables
# setting index for non-dimension variables
expected = expected.set_coords("x")
actual = original.rename_dims({"x": "x_new"})
assert_identical(expected, actual, check_default_indexes=False)
Expand All @@ -2855,7 +2855,7 @@ def test_rename_vars(self) -> None:
{"x_new": ("x", [0, 1, 2]), "y": ("x", [10, 11, 12]), "z": 42}
)
# TODO: (benbovy - explicit indexes) update when set_index supports
# seeting index for non-dimension variables
# setting index for non-dimension variables
expected = expected.set_coords("x_new")
actual = original.rename_vars({"x": "x_new"})
assert_identical(expected, actual, check_default_indexes=False)
Expand Down
2 changes: 1 addition & 1 deletion xarray/tests/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ def test_groupby_keep_attrs(self, keep_attrs):
with xr.set_options(use_flox=True):
actual = array.groupby("abc").mean(keep_attrs=keep_attrs)

# values are tested elsewhere, here we jsut check data
# values are tested elsewhere, here we just check data
# TODO: add check_attrs kwarg to assert_allclose
actual.data = expected.data
assert_identical(expected, actual)
Expand Down