Skip to content

Commit bb489fa

Browse files
Fix typos found by codespell (#8375)
Co-authored-by: Maximilian Roos <[email protected]>
1 parent 78f7491 commit bb489fa

File tree

13 files changed

+14
-14
lines changed

13 files changed

+14
-14
lines changed

doc/examples/apply_ufunc_vectorize_1d.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"This example will illustrate how to conveniently apply an unvectorized function `func` to xarray objects using `apply_ufunc`. `func` expects 1D numpy arrays and returns a 1D numpy array. Our goal is to coveniently apply this function along a dimension of xarray objects that may or may not wrap dask arrays with a signature.\n",
14+
"This example will illustrate how to conveniently apply an unvectorized function `func` to xarray objects using `apply_ufunc`. `func` expects 1D numpy arrays and returns a 1D numpy array. Our goal is to conveniently apply this function along a dimension of xarray objects that may or may not wrap dask arrays with a signature.\n",
1515
"\n",
1616
"We will illustrate this using `np.interp`: \n",
1717
"\n",

doc/user-guide/io.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ with ``mode='a'`` on a Dataset containing the new variables, passing in an
819819
existing Zarr store or path to a Zarr store.
820820

821821
To resize and then append values along an existing dimension in a store, set
822-
``append_dim``. This is a good option if data always arives in a particular
822+
``append_dim``. This is a good option if data always arrives in a particular
823823
order, e.g., for time-stepping a simulation:
824824

825825
.. ipython:: python

xarray/backends/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def sync(self, compute=True, chunkmanager_store_kwargs=None):
247247
chunkmanager = get_chunked_array_type(*self.sources)
248248

249249
# TODO: consider wrapping targets with dask.delayed, if this makes
250-
# for any discernible difference in perforance, e.g.,
250+
# for any discernible difference in performance, e.g.,
251251
# targets = [dask.delayed(t) for t in self.targets]
252252

253253
if chunkmanager_store_kwargs is None:

xarray/core/accessor_dt.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ class CombinedDatetimelikeAccessor(
601601
DatetimeAccessor[T_DataArray], TimedeltaAccessor[T_DataArray]
602602
):
603603
def __new__(cls, obj: T_DataArray) -> CombinedDatetimelikeAccessor:
604-
# CombinedDatetimelikeAccessor isn't really instatiated. Instead
604+
# CombinedDatetimelikeAccessor isn't really instantiated. Instead
605605
# we need to choose which parent (datetime or timedelta) is
606606
# appropriate. Since we're checking the dtypes anyway, we'll just
607607
# do all the validation here.

xarray/core/computation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def _unpack_dict_tuples(
408408

409409
def _check_core_dims(signature, variable_args, name):
410410
"""
411-
Chcek if an arg has all the core dims required by the signature.
411+
Check if an arg has all the core dims required by the signature.
412412
413413
Slightly awkward design, of returning the error message. But we want to
414414
give a detailed error message, which requires inspecting the variable in

xarray/core/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ def _flox_reduce(
989989
if kwargs["func"] not in ["sum", "prod"]:
990990
raise TypeError("Received an unexpected keyword argument 'min_count'")
991991
elif kwargs["min_count"] is None:
992-
# set explicitly to avoid unncessarily accumulating count
992+
# set explicitly to avoid unnecessarily accumulating count
993993
kwargs["min_count"] = 0
994994

995995
# weird backcompat

xarray/core/missing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ def interp_func(var, x, new_x, method: InterpOptions, kwargs):
678678
679679
Notes
680680
-----
681-
This requiers scipy installed.
681+
This requires scipy installed.
682682
683683
See Also
684684
--------
@@ -724,7 +724,7 @@ def interp_func(var, x, new_x, method: InterpOptions, kwargs):
724724
for i in range(new_x[0].ndim)
725725
}
726726

727-
# if useful, re-use localize for each chunk of new_x
727+
# if useful, reuse localize for each chunk of new_x
728728
localize = (method in ["linear", "nearest"]) and new_x0_chunks_is_not_none
729729

730730
# scipy.interpolate.interp1d always forces to float.

xarray/core/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
_DTypeLikeNested = Any # TODO: wait for support for recursive types
6363

6464
# Xarray requires a Mapping[Hashable, dtype] in many places which
65-
# conflics with numpys own DTypeLike (with dtypes for fields).
65+
# conflicts with numpys own DTypeLike (with dtypes for fields).
6666
# https://numpy.org/devdocs/reference/typing.html#numpy.typing.DTypeLike
6767
# This is a copy of this DTypeLike that allows only non-Mapping dtypes.
6868
DTypeLikeSave = Union[

xarray/namedarray/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def __init__(
255255
def __init_subclass__(cls, **kwargs: Any) -> None:
256256
if NamedArray in cls.__bases__ and (cls._new == NamedArray._new):
257257
# Type hinting does not work for subclasses unless _new is
258-
# overriden with the correct class.
258+
# overridden with the correct class.
259259
raise TypeError(
260260
"Subclasses of `NamedArray` must override the `_new` method."
261261
)

xarray/tests/test_concat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ def test_concat_errors(self):
622622
concat([data, data], "new_dim", data_vars=["not_found"])
623623

624624
with pytest.raises(ValueError, match=r"global attributes not"):
625-
# call deepcopy seperately to get unique attrs
625+
# call deepcopy separately to get unique attrs
626626
data0 = deepcopy(split_data[0])
627627
data1 = deepcopy(split_data[1])
628628
data1.attrs["foo"] = "bar"

xarray/tests/test_formatting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def test_array_repr_variable(self) -> None:
497497
def test_array_repr_recursive(self) -> None:
498498
# GH:issue:7111
499499

500-
# direct recurion
500+
# direct recursion
501501
var = xr.Variable("x", [0, 1])
502502
var.attrs["x"] = var
503503
formatting.array_repr(var)

xarray/tests/test_plot.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2768,7 +2768,7 @@ def test_datetime_hue(self) -> None:
27682768
def test_facetgrid_hue_style(self) -> None:
27692769
ds2 = self.ds.copy()
27702770

2771-
# Numbers plots as continous:
2771+
# Numbers plots as continuous:
27722772
g = ds2.plot.scatter(x="A", y="B", row="row", col="col", hue="hue")
27732773
assert isinstance(g._mappables[-1], mpl.collections.PathCollection)
27742774

xarray/util/generate_ops.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def {method}(self, *args: Any, **kwargs: Any) -> Self:
121121
# We need to add "# type: ignore[override]"
122122
# Keep an eye out for:
123123
# https://discuss.python.org/t/make-type-hints-for-eq-of-primitives-less-strict/34240
124-
# The type ignores might not be neccesary anymore at some point.
124+
# The type ignores might not be necessary anymore at some point.
125125
#
126126
# We require a "hack" to tell type checkers that e.g. Variable + DataArray = DataArray
127127
# In reality this returns NotImplementes, but this is not a valid type in python 3.9.

0 commit comments

Comments
 (0)