Skip to content

Commit 05072ed

Browse files
authored
Fix references to core classes in docs (#10207)
* fix references to core classes in docs * what's new
1 parent 085b0e7 commit 05072ed

File tree

7 files changed

+23
-21
lines changed

7 files changed

+23
-21
lines changed

doc/internals/how-to-create-custom-index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ number, order and dimensions of the coordinates are all arbitrary), it is the
5353
responsibility of the index to check the consistency and validity of those input
5454
coordinates.
5555

56-
For example, :py:class:`~xarray.core.indexes.PandasIndex` accepts only one coordinate and
57-
:py:class:`~xarray.core.indexes.PandasMultiIndex` accepts one or more 1-dimensional coordinates that must all
56+
For example, :py:class:`~xarray.indexes.PandasIndex` accepts only one coordinate and
57+
:py:class:`~xarray.indexes.PandasMultiIndex` accepts one or more 1-dimensional coordinates that must all
5858
share the same dimension. Other, custom indexes need not have the same
5959
constraints, e.g.,
6060

doc/internals/internal-design.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ DataArray Objects
8686

8787
The simplest data structure used by most users is :py:class:`~xarray.DataArray`.
8888
A :py:class:`~xarray.DataArray` is a composite object consisting of multiple
89-
:py:class:`~xarray.core.variable.Variable` objects which store related data.
89+
:py:class:`~xarray.Variable` objects which store related data.
9090

91-
A single :py:class:`~xarray.core.Variable` is referred to as the "data variable", and stored under the :py:attr:`~xarray.DataArray.variable`` attribute.
91+
A single :py:class:`~xarray.Variable` is referred to as the "data variable", and stored under the :py:attr:`~xarray.DataArray.variable`` attribute.
9292
A :py:class:`~xarray.DataArray` inherits all of the properties of this data variable, i.e. ``dims``, ``data``, ``attrs`` and ``encoding``,
9393
all of which are implemented by forwarding on to the underlying ``Variable`` object.
9494

@@ -111,7 +111,7 @@ Finally a :py:class:`~xarray.DataArray` defines a :py:attr:`~xarray.DataArray.na
111111
variable but is stored on the wrapping ``DataArray`` class.
112112
The ``name`` attribute is primarily used when one or more :py:class:`~xarray.DataArray` objects are promoted into a :py:class:`~xarray.Dataset`
113113
(e.g. via :py:meth:`~xarray.DataArray.to_dataset`).
114-
Note that the underlying :py:class:`~xarray.core.Variable` objects are all unnamed, so they can always be referred to uniquely via a
114+
Note that the underlying :py:class:`~xarray.Variable` objects are all unnamed, so they can always be referred to uniquely via a
115115
dict-like mapping.
116116

117117
.. _internal design.dataset:

doc/internals/interoperability.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This interoperability comes via a set of flexible abstractions into which the us
1010

1111
- :ref:`Custom file backends <add_a_backend>` via the :py:class:`~xarray.backends.BackendEntrypoint` system,
1212
- Numpy-like :ref:`"duck" array wrapping <internals.duckarrays>`, which supports the `Python Array API Standard <https://data-apis.org/array-api/latest/>`_,
13-
- :ref:`Chunked distributed array computation <internals.chunkedarrays>` via the :py:class:`~xarray.core.parallelcompat.ChunkManagerEntrypoint` system,
13+
- :ref:`Chunked distributed array computation <internals.chunkedarrays>` via the :py:class:`~xarray.namedarray.parallelcompat.ChunkManagerEntrypoint` system,
1414
- Custom :py:class:`~xarray.Index` objects for :ref:`flexible label-based lookups <internals.custom indexes>`,
1515
- Extending xarray objects with domain-specific methods via :ref:`custom accessors <internals.accessors>`.
1616

doc/user-guide/combining.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Combining data
2222
Concatenate
2323
~~~~~~~~~~~
2424

25-
To combine :py:class:`~xarray.Dataset`s / :py:class:`~xarray.DataArray`s along an existing or new dimension
25+
To combine :py:class:`~xarray.Dataset` / :py:class:`~xarray.DataArray` objects along an existing or new dimension
2626
into a larger object, you can use :py:func:`~xarray.concat`. ``concat``
2727
takes an iterable of ``DataArray`` or ``Dataset`` objects, as well as a
2828
dimension name, and concatenates along that dimension:

doc/whats-new.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ Bug fixes
4040
Documentation
4141
~~~~~~~~~~~~~
4242

43+
- Fix references to core classes in docs (:issue:`10195`, :pull:`10207`).
44+
By `Mattia Almansi <https://github.com/malmans2>`_.
4345

4446
Internal Changes
4547
~~~~~~~~~~~~~~~~
@@ -480,7 +482,7 @@ Documentation
480482

481483
Internal Changes
482484
~~~~~~~~~~~~~~~~
483-
- ``persist`` methods now route through the :py:class:`xr.core.parallelcompat.ChunkManagerEntrypoint` (:pull:`9682`).
485+
- ``persist`` methods now route through the :py:class:`xr.namedarray.parallelcompat.ChunkManagerEntrypoint` (:pull:`9682`).
484486
By `Sam Levang <https://github.com/slevang>`_.
485487

486488
.. _whats-new.2024.10.0:
@@ -1868,7 +1870,7 @@ Bug fixes
18681870
Internal Changes
18691871
~~~~~~~~~~~~~~~~
18701872
- Experimental support for wrapping chunked array libraries other than dask.
1871-
A new ABC is defined - :py:class:`xr.core.parallelcompat.ChunkManagerEntrypoint` - which can be subclassed and then
1873+
A new ABC is defined - :py:class:`xr.namedarray.parallelcompat.ChunkManagerEntrypoint` - which can be subclassed and then
18721874
registered by alternative chunked array implementations. (:issue:`6807`, :pull:`7019`)
18731875
By `Tom Nicholas <https://github.com/TomNicholas>`_.
18741876

xarray/core/dataarray.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -7072,7 +7072,7 @@ def weighted(self, weights: DataArray) -> DataArrayWeighted:
70727072
70737073
Returns
70747074
-------
7075-
core.weighted.DataArrayWeighted
7075+
computation.weighted.DataArrayWeighted
70767076
70777077
See Also
70787078
--------
@@ -7117,7 +7117,7 @@ def rolling(
71177117
71187118
Returns
71197119
-------
7120-
core.rolling.DataArrayRolling
7120+
computation.rolling.DataArrayRolling
71217121
71227122
Examples
71237123
--------
@@ -7157,7 +7157,7 @@ def rolling(
71577157
--------
71587158
DataArray.cumulative
71597159
Dataset.rolling
7160-
core.rolling.DataArrayRolling
7160+
computation.rolling.DataArrayRolling
71617161
"""
71627162
from xarray.computation.rolling import DataArrayRolling
71637163

@@ -7183,7 +7183,7 @@ def cumulative(
71837183
71847184
Returns
71857185
-------
7186-
core.rolling.DataArrayRolling
7186+
computation.rolling.DataArrayRolling
71877187
71887188
Examples
71897189
--------
@@ -7217,7 +7217,7 @@ def cumulative(
72177217
--------
72187218
DataArray.rolling
72197219
Dataset.cumulative
7220-
core.rolling.DataArrayRolling
7220+
computation.rolling.DataArrayRolling
72217221
"""
72227222
from xarray.computation.rolling import DataArrayRolling
72237223

@@ -7265,7 +7265,7 @@ def coarsen(
72657265
72667266
Returns
72677267
-------
7268-
core.rolling.DataArrayCoarsen
7268+
computation.rolling.DataArrayCoarsen
72697269
72707270
Examples
72717271
--------
@@ -7360,7 +7360,7 @@ def coarsen(
73607360
73617361
See Also
73627362
--------
7363-
:class:`core.rolling.DataArrayCoarsen <core.rolling.DataArrayCoarsen>`
7363+
:class:`computation.rolling.DataArrayCoarsen <computation.rolling.DataArrayCoarsen>`
73647364
:func:`Dataset.coarsen <Dataset.coarsen>`
73657365
73667366
:ref:`reshape.coarsen`

xarray/core/dataset.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -10046,7 +10046,7 @@ def weighted(self, weights: DataArray) -> DatasetWeighted:
1004610046
1004710047
Returns
1004810048
-------
10049-
core.weighted.DatasetWeighted
10049+
computation.weighted.DatasetWeighted
1005010050
1005110051
See Also
1005210052
--------
@@ -10091,7 +10091,7 @@ def rolling(
1009110091
1009210092
Returns
1009310093
-------
10094-
core.rolling.DatasetRolling
10094+
computation.rolling.DatasetRolling
1009510095
1009610096
See Also
1009710097
--------
@@ -10123,7 +10123,7 @@ def cumulative(
1012310123
1012410124
Returns
1012510125
-------
10126-
core.rolling.DatasetRolling
10126+
computation.rolling.DatasetRolling
1012710127
1012810128
See Also
1012910129
--------
@@ -10175,11 +10175,11 @@ def coarsen(
1017510175
1017610176
Returns
1017710177
-------
10178-
core.rolling.DatasetCoarsen
10178+
computation.rolling.DatasetCoarsen
1017910179
1018010180
See Also
1018110181
--------
10182-
:class:`core.rolling.DatasetCoarsen`
10182+
:class:`computation.rolling.DatasetCoarsen`
1018310183
:func:`DataArray.coarsen <DataArray.coarsen>`
1018410184
1018510185
:ref:`reshape.coarsen`

0 commit comments

Comments
 (0)