Skip to content

Commit 0faa6b7

Browse files
authored
DOC: Correct typos like a/an usage (#10905)
1 parent 6da8c2c commit 0faa6b7

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

design_notes/flexible_indexes_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ Indexes:
350350

351351
To keep the `repr` compact, we could:
352352

353-
- consolidate entries that map to the same index object, and have an short inline repr for `XarrayIndex` object
353+
- consolidate entries that map to the same index object, and have a short inline repr for `XarrayIndex` object
354354
- collapse the index section by default in the HTML `repr`
355355
- maybe omit all trivial indexes for 1D coordinates that match the dimension name
356356

doc/user-guide/data-structures.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ in the dictionary:
360360
Where a pandas object is supplied as a value, the names of its indexes are used as dimension
361361
names, and its data is aligned to any existing dimensions.
362362

363-
You can also create an dataset from:
363+
You can also create a dataset from:
364364

365365
- A :py:class:`pandas.DataFrame` or ``pandas.Panel`` along its columns and items
366366
respectively, by passing it into the :py:class:`~xarray.Dataset` directly
@@ -559,7 +559,7 @@ nested dict-like containers of both :py:class:`xarray.DataArray`\s and :py:class
559559
A single datatree object is known as a "node", and its position relative to
560560
other nodes is defined by two more key properties:
561561

562-
- ``children``: An dictionary mapping from names to other :py:class:`~xarray.DataTree`
562+
- ``children``: A dictionary mapping from names to other :py:class:`~xarray.DataTree`
563563
objects, known as its "child nodes".
564564
- ``parent``: The single :py:class:`~xarray.DataTree` object whose children this datatree is a
565565
member of, known as its "parent node".

doc/user-guide/hierarchical-data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ Operations and Methods on Trees
485485
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
486486

487487
To show how applying operations across a whole tree at once can be useful,
488-
let's first create a example scientific dataset.
488+
let's first create an example scientific dataset.
489489

490490
.. jupyter-execute::
491491

xarray/backends/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ def open_dataarray(
650650
backend_kwargs: dict[str, Any] | None = None,
651651
**kwargs,
652652
) -> DataArray:
653-
"""Open an DataArray from a file or file-like object containing a single
653+
"""Open a DataArray from a file or file-like object containing a single
654654
data variable.
655655
656656
This is designed to read netCDF files with only one data variable. If

xarray/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def _name(iris_obj, default="unknown"):
155155

156156

157157
def from_iris(cube):
158-
"""Convert a Iris cube into an DataArray"""
158+
"""Convert a Iris cube into a DataArray"""
159159
import iris.exceptions
160160

161161
name = _name(cube)

xarray/core/indexing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ def __setitem__(self, indexer: ExplicitIndexer, value: Any) -> None:
977977

978978
def as_indexable(array):
979979
"""
980-
This function always returns a ExplicitlyIndexed subclass,
980+
This function always returns an ExplicitlyIndexed subclass,
981981
so that the vectorized indexing is always possible with the returned
982982
object.
983983
"""
@@ -1315,7 +1315,7 @@ def _decompose_outer_indexer(
13151315
arrays that only support basic or outer indexing.
13161316
13171317
As an example, let us consider to index a few elements from a backend array
1318-
with a orthogonal indexer ([0, 3, 1], [2, 3, 2]).
1318+
with an orthogonal indexer ([0, 3, 1], [2, 3, 2]).
13191319
Even if the backend array only supports basic indexing, it is more
13201320
efficient to load a subslice of the array than loading the entire array,
13211321

xarray/core/treenode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TreeNode:
4949
5050
This class stores no data, it has only parents and children attributes, and various methods.
5151
52-
Stores child nodes in an dict, ensuring that equality checks between trees
52+
Stores child nodes in a dict, ensuring that equality checks between trees
5353
and order of child nodes is preserved (since python 3.7).
5454
5555
Nodes themselves are intrinsically unnamed (do not possess a ._name attribute), but if the node has a parent you can

xarray/core/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ def __len__(self) -> int:
900900

901901

902902
def get_temp_dimname(dims: Container[Hashable], new_dim: Hashable) -> Hashable:
903-
"""Get an new dimension name based on new_dim, that is not used in dims.
903+
"""Get a new dimension name based on new_dim, that is not used in dims.
904904
If the same name exists, we add an underscore(s) in the head.
905905
906906
Example1:

0 commit comments

Comments
 (0)