Skip to content

Commit 40f2003

Browse files
Armavicahollymandel
authored andcommitted
Fix typos across the code, doc and comments (pydata#9443)
1 parent 2de4d27 commit 40f2003

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
@@ -122,7 +122,7 @@ New Features
122122
(:issue:`6610`, :pull:`8840`).
123123
By `Deepak Cherian <https://github.com/dcherian>`_.
124124
- Allow rechunking to a frequency using ``Dataset.chunk(time=TimeResampler("YE"))`` syntax. (:issue:`7559`, :pull:`9109`)
125-
Such rechunking allows many time domain analyses to be executed in an embarassingly parallel fashion.
125+
Such rechunking allows many time domain analyses to be executed in an embarrassingly parallel fashion.
126126
By `Deepak Cherian <https://github.com/dcherian>`_.
127127
- Allow per-variable specification of ```mask_and_scale``, ``decode_times``, ``decode_timedelta``
128128
``use_cftime`` and ``concat_characters`` params in :py:func:`~xarray.open_dataset` (:pull:`9218`).
@@ -155,7 +155,7 @@ Breaking changes
155155

156156
Bug fixes
157157
~~~~~~~~~
158-
- Fix scatter plot broadcasting unneccesarily. (:issue:`9129`, :pull:`9206`)
158+
- Fix scatter plot broadcasting unnecessarily. (:issue:`9129`, :pull:`9206`)
159159
By `Jimmy Westling <https://github.com/illviljan>`_.
160160
- Don't convert custom indexes to ``pandas`` indexes when computing a diff (:pull:`9157`)
161161
By `Justus Magin <https://github.com/keewis>`_.
@@ -618,7 +618,7 @@ Internal Changes
618618
~~~~~~~~~~~~~~~~
619619

620620
- The implementation of :py:func:`map_blocks` has changed to minimize graph size and duplication of data.
621-
This should be a strict improvement even though the graphs are not always embarassingly parallel any more.
621+
This should be a strict improvement even though the graphs are not always embarrassingly parallel any more.
622622
Please open an issue if you spot a regression. (:pull:`8412`, :issue:`8409`).
623623
By `Deepak Cherian <https://github.com/dcherian>`_.
624624
- 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
@@ -740,7 +740,7 @@ def _generate_anchored_deprecated_frequencies(
740740
return pairs
741741

742742

743-
_DEPRECATED_FREQUENICES: dict[str, str] = {
743+
_DEPRECATED_FREQUENCIES: dict[str, str] = {
744744
"A": "YE",
745745
"Y": "YE",
746746
"AS": "YS",
@@ -766,7 +766,7 @@ def _generate_anchored_deprecated_frequencies(
766766

767767

768768
def _emit_freq_deprecation_warning(deprecated_freq):
769-
recommended_freq = _DEPRECATED_FREQUENICES[deprecated_freq]
769+
recommended_freq = _DEPRECATED_FREQUENCIES[deprecated_freq]
770770
message = _DEPRECATION_MESSAGE.format(
771771
deprecated_freq=deprecated_freq, recommended_freq=recommended_freq
772772
)
@@ -792,7 +792,7 @@ def to_offset(
792792
freq_data = match.groupdict()
793793

794794
freq = freq_data["freq"]
795-
if warn and freq in _DEPRECATED_FREQUENICES:
795+
if warn and freq in _DEPRECATED_FREQUENCIES:
796796
_emit_freq_deprecation_warning(freq)
797797
multiples = freq_data["multiple"]
798798
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
@@ -9750,7 +9750,7 @@ def eval(
97509750
Calculate an expression supplied as a string in the context of the dataset.
97519751
97529752
This is currently experimental; the API may change particularly around
9753-
assignments, which currently returnn a ``Dataset`` with the additional variable.
9753+
assignments, which currently return a ``Dataset`` with the additional variable.
97549754
Currently only the ``python`` engine is supported, which has the same
97559755
performance as executing in python.
97569756

xarray/core/datatree.py

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

0 commit comments

Comments
 (0)