Skip to content

Commit c085199

Browse files
authored
DOC: Correct more typos in xarray documentation (pydata#11092)
* DOC: "a np.dtype" -> "an np.dtype" * DOC: an Variable -> a Variable * DOC: Wording: "Converts a Variable into another Variable" * DOC: an vectorized -> a vectorized * DOC: Correct another typo regarding a/an usage
1 parent a96ea66 commit c085199

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

xarray/backends/zarr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ def extract_zarr_variable_encoding(
487487
# The only change is to raise an error for object dtypes.
488488
def encode_zarr_variable(var, needs_copy=True, name=None):
489489
"""
490-
Converts an Variable into an Variable which follows some
490+
Converts a Variable into another Variable which follows some
491491
of the CF conventions:
492492
493493
- Nans are masked using _FillValue (or the deprecated missing_value)

xarray/compat/npcompat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def isdtype( # type: ignore[misc]
6464
)
6565
if unknown_kinds := {k for k in str_kinds if k not in kind_mapping}:
6666
raise ValueError(
67-
f"unknown kind: {unknown_kinds}, must be a np.dtype or one of {list(kind_mapping)}"
67+
f"unknown kind: {unknown_kinds}, must be an np.dtype or one of {list(kind_mapping)}"
6868
)
6969

7070
# verified the dtypes already, no need to check again

xarray/core/indexing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,7 @@ def as_indexable(array):
10231023
def _outer_to_vectorized_indexer(
10241024
indexer: BasicIndexer | OuterIndexer, shape: _Shape
10251025
) -> VectorizedIndexer:
1026-
"""Convert an OuterIndexer into an vectorized indexer.
1026+
"""Convert an OuterIndexer into a vectorized indexer.
10271027
10281028
Parameters
10291029
----------

xarray/core/variable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ class Variable(NamedArray, AbstractArray, VariableArithmetic):
353353
354354
The main functional difference between Variables and numpy arrays is that
355355
numerical operations on Variables implement array broadcasting by dimension
356-
name. For example, adding an Variable with dimensions `('time',)` to
356+
name. For example, adding a Variable with dimensions `('time',)` to
357357
another Variable with dimensions `('space',)` results in a new Variable
358358
with dimensions `('time', 'space')`. Furthermore, numpy reduce operations
359359
like ``mean`` or ``sum`` are overwritten to take a "dimension" argument

xarray/util/generate_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
("__invert__", "operator.invert"),
7373
)
7474
# round method and numpy/pandas unary methods which don't modify the data shape,
75-
# so the result should still be wrapped in an Variable/DataArray/Dataset
75+
# so the result should still be wrapped in a Variable/DataArray/Dataset
7676
OTHER_UNARY_METHODS = (
7777
("round", "ops.round_"),
7878
("argsort", "ops.argsort"),

0 commit comments

Comments
 (0)