Skip to content

Commit 29a87cc

Browse files
authored
In documentation on adding a new backend, add missing import and tweak headings (#6330)
1 parent f42ac28 commit 29a87cc

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

doc/internals/how-to-add-new-backend.rst

+11-3
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Xarray :py:meth:`~xarray.open_dataset`, and returns a boolean.
172172

173173
Decoders
174174
^^^^^^^^
175+
175176
The decoders implement specific operations to transform data from on-disk
176177
representation to Xarray representation.
177178

@@ -199,6 +200,11 @@ performs the inverse transformation.
199200

200201
In the following an example on how to use the coders ``decode`` method:
201202

203+
.. ipython:: python
204+
:suppress:
205+
206+
import xarray as xr
207+
202208
.. ipython:: python
203209
204210
var = xr.Variable(
@@ -239,7 +245,7 @@ interface only the boolean keywords related to the supported decoders.
239245
.. _RST backend_registration:
240246

241247
How to register a backend
242-
+++++++++++++++++++++++++++
248+
+++++++++++++++++++++++++
243249

244250
Define a new entrypoint in your ``setup.py`` (or ``setup.cfg``) with:
245251

@@ -280,8 +286,9 @@ See https://python-poetry.org/docs/pyproject/#plugins for more information on Po
280286

281287
.. _RST lazy_loading:
282288

283-
How to support Lazy Loading
289+
How to support lazy loading
284290
+++++++++++++++++++++++++++
291+
285292
If you want to make your backend effective with big datasets, then you should
286293
support lazy loading.
287294
Basically, you shall replace the :py:class:`numpy.ndarray` inside the
@@ -380,8 +387,9 @@ opening files, we therefore suggest to use the helper class provided by Xarray
380387

381388
.. _RST indexing:
382389

383-
Indexing Examples
390+
Indexing examples
384391
^^^^^^^^^^^^^^^^^
392+
385393
**BASIC**
386394

387395
In the ``BASIC`` indexing support, numbers and slices are supported.

0 commit comments

Comments
 (0)