Skip to content

docs: clarify DataArray coords list description#11326

Open
jaythehardcoder wants to merge 1 commit intopydata:mainfrom
jaythehardcoder:docs/dataarray-coords-description
Open

docs: clarify DataArray coords list description#11326
jaythehardcoder wants to merge 1 commit intopydata:mainfrom
jaythehardcoder:docs/dataarray-coords-description

Conversation

@jaythehardcoder
Copy link
Copy Markdown

Description

Closes #10118.

Clarifies the DataArray user-guide description of coords when a list is passed. The old text said a list "should be a list of tuples", but the example immediately below uses coords=[times, locs] with dims=["time", "space"]. The updated text matches that positional form and points readers to dictionaries for named or more complex coordinate definitions.

Checklist

Verification

  • Ran a Python check for the documented xr.DataArray(data, coords=[times, locs], dims=["time", "space"]) example and verified the dimensions/coordinates.
  • Checked that the stale "list of tuples" wording was removed from doc/user-guide/data-structures.rst.

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Hermes Agent / OpenAI Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Description of coords type in documentation contradicts the example following it.

1 participant