home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1121761078

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1121761078 PR_kwDOAMm_X84x9VPA 6232 Amended docstring to reflect the actual behaviour of Dataset.map 14276158 closed 0     4 2022-02-02T10:39:30Z 2022-02-23T09:51:41Z 2022-02-23T09:51:27Z CONTRIBUTOR   0 pydata/xarray/pulls/6232

In MetPy/pull#2312, I noticed that the behavior of Dataset.map's kwarg keep_attrs was not in line with its docstring. This is because in xarray 0.16.2 (pydata/xarray#3595 & pydata/xarray#4195) this behavior was changed.

In short, keep_attrs=True now copies both, the Dataset's and the variables' attributes and adds them to the new objects - preventing any change to them by the mapped function. In contrast, keep_attrs= False discards the Dataset's attributes and does not touch the variables' attributes, enabling the mapped function to modify them.

Here, I propose an update to the keep_attrs docstring of Dataset.map which would more accurately reflect its current behavior. Please feel free to provide alternative formulations if you feel like this one misses the mark.

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6232/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
    13221727 pull

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 4 rows from issue in issue_comments
Powered by Datasette · Queries took 0.781ms · About: xarray-datasette