diff --git a/doc/api.rst b/doc/api.rst index b6023866eb8..df6e87c0cf8 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -1576,6 +1576,7 @@ Custom Indexes CFTimeIndex indexes.RangeIndex + indexes.CoordinateTransformIndex Creating custom indexes ----------------------- @@ -1588,6 +1589,13 @@ Creating custom indexes indexes.RangeIndex.arange indexes.RangeIndex.linspace +Building custom indexes +----------------------- +.. autosummary:: + :toctree: generated/ + + indexes.CoordinateTransform + Tutorial ======== diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 607661ed30b..a481b00bdee 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -12,6 +12,8 @@ v2025.07.0 (unreleased) New Features ~~~~~~~~~~~~ +- Expose :py:class:`~xarray.indexes.RangeIndex`, and :py:class:`~xarray.indexes.CoordinateTransformIndex` as public api + under the ``xarray.indexes`` namespace. By `Deepak Cherian `_. Breaking changes diff --git a/xarray/__init__.py b/xarray/__init__.py index d1001b4470a..04fb5b03867 100644 --- a/xarray/__init__.py +++ b/xarray/__init__.py @@ -1,6 +1,6 @@ from importlib.metadata import version as _version -from xarray import coders, groupers, testing, tutorial, ufuncs +from xarray import coders, groupers, indexes, testing, tutorial, ufuncs from xarray.backends.api import ( load_dataarray, load_dataset, @@ -70,6 +70,7 @@ # Sub-packages "coders", "groupers", + "indexes", "testing", "tutorial", "ufuncs", diff --git a/xarray/indexes/__init__.py b/xarray/indexes/__init__.py index fafdb49c7e1..c53a4b8c2ce 100644 --- a/xarray/indexes/__init__.py +++ b/xarray/indexes/__init__.py @@ -3,11 +3,20 @@ """ +from xarray.core.coordinate_transform import CoordinateTransform from xarray.core.indexes import ( + CoordinateTransformIndex, Index, PandasIndex, PandasMultiIndex, ) from xarray.indexes.range_index import RangeIndex -__all__ = ["Index", "PandasIndex", "PandasMultiIndex", "RangeIndex"] +__all__ = [ + "CoordinateTransform", + "CoordinateTransformIndex", + "Index", + "PandasIndex", + "PandasMultiIndex", + "RangeIndex", +] pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy