Skip to content

Commit a1448d5

Browse files
committed
Fix typos across the code, doc and comments
1 parent 25debff commit a1448d5

24 files changed

+37
-36
lines changed

design_notes/flexible_indexes_notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ An `XarrayIndex` subclass must/should/may implement the following properties/met
7171
- a `data` property to access index's data and map it to coordinate data (see [Section 4](#4-indexvariable))
7272
- a `__getitem__()` implementation to propagate the index through DataArray/Dataset indexing operations
7373
- `equals()`, `union()` and `intersection()` methods for data alignment (see [Section 2.6](#26-using-indexes-for-data-alignment))
74-
- Xarray coordinate getters (see [Section 2.2.4](#224-implicit-coodinates))
74+
- Xarray coordinate getters (see [Section 2.2.4](#224-implicit-coordinates))
7575
- a method that may return a new index and that will be called when one of the corresponding coordinates is dropped from the Dataset/DataArray (multi-coordinate indexes)
7676
- `encode()`/`decode()` methods that would allow storage-agnostic serialization and fast-path reconstruction of the underlying index object(s) (see [Section 2.8](#28-index-encoding))
7777
- one or more "non-standard" methods or properties that could be leveraged in Xarray 3rd-party extensions like Dataset/DataArray accessors (see [Section 2.7](#27-using-indexes-for-other-purposes))

design_notes/grouper_objects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ where `|` represents chunk boundaries. A simple rechunking to
166166
```
167167
000|111122|3333
168168
```
169-
would make this resampling reduction an embarassingly parallel blockwise problem.
169+
would make this resampling reduction an embarrassingly parallel blockwise problem.
170170

171171
Similarly consider monthly-mean climatologies for which the month numbers might be
172172
```

design_notes/named_array_design_doc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Questions:
258258
Variable.coarsen_reshape
259259
Variable.rolling_window
260260

261-
Variable.set_dims # split this into broadcas_to and expand_dims
261+
Variable.set_dims # split this into broadcast_to and expand_dims
262262

263263

264264
# Reordering/Reshaping

doc/user-guide/dask.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Automatic parallelization with ``apply_ufunc`` and ``map_blocks``
298298

299299
.. tip::
300300

301-
Some problems can become embarassingly parallel and thus easy to parallelize
301+
Some problems can become embarrassingly parallel and thus easy to parallelize
302302
automatically by rechunking to a frequency, e.g. ``ds.chunk(time=TimeResampler("YE"))``.
303303
See :py:meth:`Dataset.chunk` for more.
304304

@@ -559,7 +559,7 @@ larger chunksizes.
559559

560560
.. tip::
561561

562-
Many time domain problems become amenable to an embarassingly parallel or blockwise solution
562+
Many time domain problems become amenable to an embarrassingly parallel or blockwise solution
563563
(e.g. using :py:func:`xarray.map_blocks`, :py:func:`dask.array.map_blocks`, or
564564
:py:func:`dask.array.blockwise`) by rechunking to a frequency along the time dimension.
565565
Provide :py:class:`xarray.groupers.TimeResampler` objects to :py:meth:`Dataset.chunk` to do so.

doc/user-guide/data-structures.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pressure that were made under various conditions:
289289
* the measurements were made on four different days;
290290
* they were made at two separate locations, which we will represent using
291291
their latitude and longitude; and
292-
* they were made using instruments by three different manufacutrers, which we
292+
* they were made using instruments by three different manufacturers, which we
293293
will refer to as `'manufac1'`, `'manufac2'`, and `'manufac3'`.
294294

295295
.. ipython:: python

doc/user-guide/pandas.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Particularly after a roundtrip, the following deviations are noted:
120120

121121
- a non-dimension Dataset ``coordinate`` is converted into ``variable``
122122
- a non-dimension DataArray ``coordinate`` is not converted
123-
- ``dtype`` is not allways the same (e.g. "str" is converted to "object")
123+
- ``dtype`` is not always the same (e.g. "str" is converted to "object")
124124
- ``attrs`` metadata is not conserved
125125

126126
To avoid these problems, the third-party `ntv-pandas <https://github.com/loco-philippe/ntv-pandas>`__ library offers lossless and reversible conversions between

doc/whats-new.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ New Features
118118
(:issue:`6610`, :pull:`8840`).
119119
By `Deepak Cherian <https://github.com/dcherian>`_.
120120
- Allow rechunking to a frequency using ``Dataset.chunk(time=TimeResampler("YE"))`` syntax. (:issue:`7559`, :pull:`9109`)
121-
Such rechunking allows many time domain analyses to be executed in an embarassingly parallel fashion.
121+
Such rechunking allows many time domain analyses to be executed in an embarrassingly parallel fashion.
122122
By `Deepak Cherian <https://github.com/dcherian>`_.
123123
- Allow per-variable specification of ```mask_and_scale``, ``decode_times``, ``decode_timedelta``
124124
``use_cftime`` and ``concat_characters`` params in :py:func:`~xarray.open_dataset` (:pull:`9218`).
@@ -151,7 +151,7 @@ Breaking changes
151151

152152
Bug fixes
153153
~~~~~~~~~
154-
- Fix scatter plot broadcasting unneccesarily. (:issue:`9129`, :pull:`9206`)
154+
- Fix scatter plot broadcasting unnecessarily. (:issue:`9129`, :pull:`9206`)
155155
By `Jimmy Westling <https://github.com/illviljan>`_.
156156
- Don't convert custom indexes to ``pandas`` indexes when computing a diff (:pull:`9157`)
157157
By `Justus Magin <https://github.com/keewis>`_.
@@ -614,7 +614,7 @@ Internal Changes
614614
~~~~~~~~~~~~~~~~
615615

616616
- The implementation of :py:func:`map_blocks` has changed to minimize graph size and duplication of data.
617-
This should be a strict improvement even though the graphs are not always embarassingly parallel any more.
617+
This should be a strict improvement even though the graphs are not always embarrassingly parallel any more.
618618
Please open an issue if you spot a regression. (:pull:`8412`, :issue:`8409`).
619619
By `Deepak Cherian <https://github.com/dcherian>`_.
620620
- Remove null values before plotting. (:pull:`8535`).

xarray/coding/cftime_offsets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ def _generate_anchored_deprecated_frequencies(
739739
return pairs
740740

741741

742-
_DEPRECATED_FREQUENICES: dict[str, str] = {
742+
_DEPRECATED_FREQUENCIES: dict[str, str] = {
743743
"A": "YE",
744744
"Y": "YE",
745745
"AS": "YS",
@@ -765,7 +765,7 @@ def _generate_anchored_deprecated_frequencies(
765765

766766

767767
def _emit_freq_deprecation_warning(deprecated_freq):
768-
recommended_freq = _DEPRECATED_FREQUENICES[deprecated_freq]
768+
recommended_freq = _DEPRECATED_FREQUENCIES[deprecated_freq]
769769
message = _DEPRECATION_MESSAGE.format(
770770
deprecated_freq=deprecated_freq, recommended_freq=recommended_freq
771771
)
@@ -784,7 +784,7 @@ def to_offset(freq: BaseCFTimeOffset | str, warn: bool = True) -> BaseCFTimeOffs
784784
freq_data = match.groupdict()
785785

786786
freq = freq_data["freq"]
787-
if warn and freq in _DEPRECATED_FREQUENICES:
787+
if warn and freq in _DEPRECATED_FREQUENCIES:
788788
_emit_freq_deprecation_warning(freq)
789789
multiples = freq_data["multiple"]
790790
multiples = 1 if multiples is None else int(multiples)

xarray/core/dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9749,7 +9749,7 @@ def eval(
97499749
Calculate an expression supplied as a string in the context of the dataset.
97509750
97519751
This is currently experimental; the API may change particularly around
9752-
assignments, which currently returnn a ``Dataset`` with the additional variable.
9752+
assignments, which currently return a ``Dataset`` with the additional variable.
97539753
Currently only the ``python`` engine is supported, which has the same
97549754
performance as executing in python.
97559755

xarray/core/datatree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,7 @@ def to_netcdf(
15201520
mode : {"w", "a"}, default: "w"
15211521
Write ('w') or append ('a') mode. If mode='w', any existing file at
15221522
this location will be overwritten. If mode='a', existing variables
1523-
will be overwritten. Only appies to the root group.
1523+
will be overwritten. Only applies to the root group.
15241524
encoding : dict, optional
15251525
Nested dictionary with variable names as keys and dictionaries of
15261526
variable specific encodings as values, e.g.,

0 commit comments

Comments
 (0)