pydata / pydata/xarray

Document `keepdims`

Open
#9,333 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What is your issue?

I wanted to keep a dim after taking the median along that dim. I couldn't find anything about how to do this from either the median api docs , nor the aggregation docs.

After some googling though I found this feature was added in a PR through the keepdims kwarg.

It would be useful for this (plus any other hidden aggregation modes) to be documented in the Aggregation and/or apis. Discovery is one thing, and clarifying ambiguities is another. For example, what happens if I use keepdims to all the coordinates that used that dim?

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 median API documentation and the Aggregation section linked in the issue, then inspect how the existing keepdims keyword is described for aggregation methods. Document how to discover keepdims and clarify its behavior, including what happens to coordinates that use the reduced dimension. Done means the relevant API or aggregation documentation answers these questions.

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.