home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 156212120

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
156212120 MDExOlB1bGxSZXF1ZXN0NzEwMTI5NTA= 857 xarray.merge function and major refactor for merge logic 1217238 closed 0     4 2016-05-23T07:00:31Z 2016-07-28T02:40:33Z 2016-07-28T02:40:33Z MEMBER   0 pydata/xarray/pulls/857

Fixes #417

New top level :py:func:merge function allows for combining variables from any number of Dataset and/or DataArray variables.

Example usage:

```

arrays = [xr.DataArray(n, name='var%d' % n) for n in range(5)] xr.merge(arrays) <xarray.Dataset> Dimensions: () Coordinates: empty Data variables: var0 int64 0 var1 int64 1 var2 int64 2 var3 int64 3 var4 int64 4 ```

The internal refactoring also lays the ground work for supporting ufunc-like functions that merge three or more arguments, such as the full form of where.

Notes to any potential reviewers:

This doesn't have as much test coverage as I would like, but I did get all the existing functionality working. I'll see if I can add in some more tests for the internal code in merge.py. Also, more docstrings is probably a good idea.

Either way, I'm a bit nervous that I haven't broken things, because frankly I still don't understand exactly how the old code worked (and yes, I wrote it!). So we should probably make a release candidate for xarray v0.8 to avoid the need for a bug fix release shortly afterwards.

cc @jhamman @MaximilianR

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/857/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 3.688ms · About: xarray-datasette