pydata / pydata/xarray

Backend array documentation typo

Open
#7,450 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug topic-backends topic-documentation
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

What happened?

https://docs.xarray.dev/en/stable/internals/how-to-add-new-backend.html#indexing-examples

I believe there's a typo in the BASIC indexing support example:

# shall support integers
backend_array._raw_indexing_method(1, 1)

Should be:

# shall support integers
backend_array._raw_indexing_method((1, 1))

Suggestion of possible fixes:

  • Make sure it is a typo.
  • Create a valid custom MyBackendArray and initialize it. So it is easier to tell if it's a typo.
  • Add type hinting so mypy can easier catch these errors.
What did you expect to happen?

No response

Minimal Complete Verifiable Example

No response

MVCE confirmation
  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.
Relevant log output

No response

Anything else we need to know?

No response

Environment

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked xarray documentation page at the BASIC indexing support example and compare the shown _raw_indexing_method call with the surrounding indexing guidance. Verify whether the argument should be a tuple, then update the example if confirmed and check the rendered documentation for the corrected syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.