pydata / pydata/xarray

Docs say "virtual" coordinates are marked by "-", this doesn't seem to be true?

Open
#8,071 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What is your issue?

Here: https://docs.xarray.dev/en/stable/user-guide/data-structures.html#multiindex-coordinates

For convenience multi-index levels are directly accessible as “virtual” or “derived” coordinates (marked by - when printing a dataset or data array)

But right there it shows

mda
Out[76]: 
<xarray.DataArray (spec: 4)>
array([0.642, 0.275, 0.462, 0.871])
Coordinates:
  * spec     (spec) object MultiIndex
  * band     (spec) object 'R' 'R' 'V' 'V'
  * wn       (spec) float64 0.1 0.2 0.7 0.9

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

Start with the linked MultiIndex coordinates section in the xarray documentation and compare the quoted statement with the displayed DataArray output. Verify how virtual or derived coordinates are actually marked, then update the wording or example so the documentation matches the observed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.