Skip to content

Commit a34a66c

Browse files
committed
Fix typos in docs and code
1 parent bc5f2cc commit a34a66c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

xarray/core/dataarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ def reset_coords(
11071107
return self._replace(coords=dataset._variables)
11081108
if self.name is None:
11091109
raise ValueError(
1110-
"cannot reset_coords with drop=False on an unnamed DataArrray"
1110+
"cannot reset_coords with drop=False on an unnamed DataArray"
11111111
)
11121112
dataset[self.name] = self.variable
11131113
return dataset

xarray/core/indexes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ def group_by_index(
16281628
return index_coords
16291629

16301630
def to_pandas_indexes(self) -> Indexes[pd.Index]:
1631-
"""Returns an immutable proxy for Dataset or DataArrary pandas indexes.
1631+
"""Returns an immutable proxy for Dataset or DataArray pandas indexes.
16321632
16331633
Raises an error if this proxy contains indexes that cannot be coerced to
16341634
pandas.Index objects.

xarray/tests/test_backends.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3314,7 +3314,7 @@ def test_append(self) -> None:
33143314

33153315
with self.create_zarr_target() as store:
33163316
if has_zarr_v3:
3317-
# TOOD: verify these
3317+
# TODO: verify these
33183318
expected = {
33193319
"set": 17,
33203320
"get": 12,

xarray/tests/test_dataarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3801,7 +3801,7 @@ def test_to_dataset_retains_keys(self) -> None:
38013801

38023802
array = DataArray([1, 2, 3], coords=[("x", dates)], attrs={"a": 1})
38033803

3804-
# convert to dateset and back again
3804+
# convert to dataset and back again
38053805
result = array.to_dataset("x").to_dataarray(dim="x")
38063806

38073807
assert_equal(array, result)

xarray/tests/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3206,7 +3206,7 @@ def test_rename_multiindex(self) -> None:
32063206
with pytest.raises(ValueError, match=r"'b' conflicts"):
32073207
original.rename({"a": "b"})
32083208

3209-
def test_rename_perserve_attrs_encoding(self) -> None:
3209+
def test_rename_preserve_attrs_encoding(self) -> None:
32103210
# test propagate attrs/encoding to new variable(s) created from Index object
32113211
original = Dataset(coords={"x": ("x", [0, 1, 2])})
32123212
expected = Dataset(coords={"y": ("y", [0, 1, 2])})

0 commit comments

Comments
 (0)