pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.57k stars 1.07k forks source link

Document `keepdims` #9333

Open relativistic opened 1 month ago

relativistic commented 1 month ago

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?

welcome[bot] commented 1 month ago

Thanks for opening your first issue here at xarray! Be sure to follow the issue template! If you have an idea for a solution, we would really welcome a Pull Request with proposed changes. See the Contributing Guide for more. It may take us a while to respond here, but we really value your contribution. Contributors like you help make xarray better. Thank you!