Skip to content

Backend array documentation typo #7450

Description

@Illviljan

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

Details

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions