Skip to content

Fix references to core classes in docs #10207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/internals/how-to-create-custom-index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ number, order and dimensions of the coordinates are all arbitrary), it is the
responsibility of the index to check the consistency and validity of those input
coordinates.

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

Expand Down
6 changes: 3 additions & 3 deletions doc/internals/internal-design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ DataArray Objects

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

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

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

.. _internal design.dataset:
Expand Down
2 changes: 1 addition & 1 deletion doc/internals/interoperability.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This interoperability comes via a set of flexible abstractions into which the us

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

Expand Down
2 changes: 1 addition & 1 deletion doc/user-guide/combining.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Combining data
Concatenate
~~~~~~~~~~~

To combine :py:class:`~xarray.Dataset`s / :py:class:`~xarray.DataArray`s along an existing or new dimension
To combine :py:class:`~xarray.Dataset` / :py:class:`~xarray.DataArray` objects along an existing or new dimension
into a larger object, you can use :py:func:`~xarray.concat`. ``concat``
takes an iterable of ``DataArray`` or ``Dataset`` objects, as well as a
dimension name, and concatenates along that dimension:
Expand Down
6 changes: 4 additions & 2 deletions doc/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Bug fixes
Documentation
~~~~~~~~~~~~~

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

Internal Changes
~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -480,7 +482,7 @@ Documentation

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

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

Expand Down
14 changes: 7 additions & 7 deletions xarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -7072,7 +7072,7 @@ def weighted(self, weights: DataArray) -> DataArrayWeighted:

Returns
-------
core.weighted.DataArrayWeighted
computation.weighted.DataArrayWeighted

See Also
--------
Expand Down Expand Up @@ -7117,7 +7117,7 @@ def rolling(

Returns
-------
core.rolling.DataArrayRolling
computation.rolling.DataArrayRolling

Examples
--------
Expand Down Expand Up @@ -7157,7 +7157,7 @@ def rolling(
--------
DataArray.cumulative
Dataset.rolling
core.rolling.DataArrayRolling
computation.rolling.DataArrayRolling
"""
from xarray.computation.rolling import DataArrayRolling

Expand All @@ -7183,7 +7183,7 @@ def cumulative(

Returns
-------
core.rolling.DataArrayRolling
computation.rolling.DataArrayRolling

Examples
--------
Expand Down Expand Up @@ -7217,7 +7217,7 @@ def cumulative(
--------
DataArray.rolling
Dataset.cumulative
core.rolling.DataArrayRolling
computation.rolling.DataArrayRolling
"""
from xarray.computation.rolling import DataArrayRolling

Expand Down Expand Up @@ -7265,7 +7265,7 @@ def coarsen(

Returns
-------
core.rolling.DataArrayCoarsen
computation.rolling.DataArrayCoarsen

Examples
--------
Expand Down Expand Up @@ -7360,7 +7360,7 @@ def coarsen(

See Also
--------
:class:`core.rolling.DataArrayCoarsen <core.rolling.DataArrayCoarsen>`
:class:`computation.rolling.DataArrayCoarsen <computation.rolling.DataArrayCoarsen>`
:func:`Dataset.coarsen <Dataset.coarsen>`

:ref:`reshape.coarsen`
Expand Down
10 changes: 5 additions & 5 deletions xarray/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -10046,7 +10046,7 @@ def weighted(self, weights: DataArray) -> DatasetWeighted:

Returns
-------
core.weighted.DatasetWeighted
computation.weighted.DatasetWeighted

See Also
--------
Expand Down Expand Up @@ -10091,7 +10091,7 @@ def rolling(

Returns
-------
core.rolling.DatasetRolling
computation.rolling.DatasetRolling

See Also
--------
Expand Down Expand Up @@ -10123,7 +10123,7 @@ def cumulative(

Returns
-------
core.rolling.DatasetRolling
computation.rolling.DatasetRolling

See Also
--------
Expand Down Expand Up @@ -10175,11 +10175,11 @@ def coarsen(

Returns
-------
core.rolling.DatasetCoarsen
computation.rolling.DatasetCoarsen

See Also
--------
:class:`core.rolling.DatasetCoarsen`
:class:`computation.rolling.DatasetCoarsen`
:func:`DataArray.coarsen <DataArray.coarsen>`

:ref:`reshape.coarsen`
Expand Down
Loading