html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/2384#issuecomment-422535898,https://api.github.com/repos/pydata/xarray/issues/2384,422535898,MDEyOklzc3VlQ29tbWVudDQyMjUzNTg5OA==,5635139,2018-09-18T20:14:04Z,2018-09-18T20:14:04Z,MEMBER,Thank you v much @jsignell ! Both for the excellent code and for bearing with the changes!,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-422473891,https://api.github.com/repos/pydata/xarray/issues/2384,422473891,MDEyOklzc3VlQ29tbWVudDQyMjQ3Mzg5MQ==,1217238,2018-09-18T17:10:46Z,2018-09-18T17:10:46Z,MEMBER,"If we're all happy with copy (which I think we are), then this should be good to go!","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-422457576,https://api.github.com/repos/pydata/xarray/issues/2384,422457576,MDEyOklzc3VlQ29tbWVudDQyMjQ1NzU3Ng==,4806877,2018-09-18T16:19:30Z,2018-09-18T16:19:30Z,CONTRIBUTOR,Is this good to go?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-421407370,https://api.github.com/repos/pydata/xarray/issues/2384,421407370,MDEyOklzc3VlQ29tbWVudDQyMTQwNzM3MA==,4806877,2018-09-14T16:09:54Z,2018-09-14T16:09:54Z,CONTRIBUTOR,I added some examples on copy for each of the object types and I decided to let `Dataset`s do this too. I just require that the user pass a dict where keys are contained in data_vars and each value has the same shape as the corresponding data_var.,"{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-421177555,https://api.github.com/repos/pydata/xarray/issues/2384,421177555,MDEyOklzc3VlQ29tbWVudDQyMTE3NzU1NQ==,1217238,2018-09-13T22:53:32Z,2018-09-13T22:53:32Z,MEMBER,"`template.copy(data=new_data)`? That seems pretty clear, actually. ","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-421171894,https://api.github.com/repos/pydata/xarray/issues/2384,421171894,MDEyOklzc3VlQ29tbWVudDQyMTE3MTg5NA==,6815844,2018-09-13T22:23:43Z,2018-09-13T22:23:43Z,MEMBER,"how about + dataarray_like / variable_like + copy_labels ?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-421171706,https://api.github.com/repos/pydata/xarray/issues/2384,421171706,MDEyOklzc3VlQ29tbWVudDQyMTE3MTcwNg==,5635139,2018-09-13T22:22:44Z,2018-09-13T22:22:44Z,MEMBER,"Sorry I'm late to the party here. @jsignell thank you for the PR! Pandas has something similar: the `._shallow_copy` method, which accepts optional data to replace the current data. Ambitious suggestion: given that we already create shallow copies when copying, could `data` become an optional arg to `copy`? I realize it's may be a little surprising to change all the data and still call it a copy, but there's precedent. Less ambitious: I'd vote to have this as a method. I'm generally partial to methods given their discoverability and namespaces-without-cost. I think the context is clear. OTOH there is precedent with `ones_like` et al. Naming: I'd vote `labelled_like` > `structured_like`, but not strongly That said, given my timing, I'd understand if we go forward as-is","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-420626485,https://api.github.com/repos/pydata/xarray/issues/2384,420626485,MDEyOklzc3VlQ29tbWVudDQyMDYyNjQ4NQ==,4806877,2018-09-12T12:16:00Z,2018-09-12T12:16:00Z,CONTRIBUTOR,I made the docs changes and added an example. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-420393391,https://api.github.com/repos/pydata/xarray/issues/2384,420393391,MDEyOklzc3VlQ29tbWVudDQyMDM5MzM5MQ==,4806877,2018-09-11T19:26:42Z,2018-09-11T19:26:42Z,CONTRIBUTOR,I think this is good to merge,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-419486238,https://api.github.com/repos/pydata/xarray/issues/2384,419486238,MDEyOklzc3VlQ29tbWVudDQxOTQ4NjIzOA==,4806877,2018-09-07T16:01:31Z,2018-09-07T16:01:31Z,CONTRIBUTOR,"👍 for `xarray.structured_like(new_data, template)`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-419480046,https://api.github.com/repos/pydata/xarray/issues/2384,419480046,MDEyOklzc3VlQ29tbWVudDQxOTQ4MDA0Ng==,1217238,2018-09-07T15:40:53Z,2018-09-07T15:40:53Z,MEMBER,"More ideas: - `xarray.copy_structure(template, new_data)` - `xarray.structured_like(new_data, template)` - `xarray.copy_labels(template, new_data)`","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-419478223,https://api.github.com/repos/pydata/xarray/issues/2384,419478223,MDEyOklzc3VlQ29tbWVudDQxOTQ3ODIyMw==,4806877,2018-09-07T15:34:52Z,2018-09-07T15:34:52Z,CONTRIBUTOR,That said. I think `with_data` is better than anything replace. I would worry about confusion with the pandas replace which replaces specific values. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-419477495,https://api.github.com/repos/pydata/xarray/issues/2384,419477495,MDEyOklzc3VlQ29tbWVudDQxOTQ3NzQ5NQ==,4806877,2018-09-07T15:32:22Z,2018-09-07T15:32:22Z,CONTRIBUTOR,I don't like it being a method on an existing object. I think the syntax is clearer if the template object is an argument and the second argument is the data. I think that conveys the concept of creating a new object that is just using the structure of another object.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-419476614,https://api.github.com/repos/pydata/xarray/issues/2384,419476614,MDEyOklzc3VlQ29tbWVudDQxOTQ3NjYxNA==,1217238,2018-09-07T15:29:40Z,2018-09-07T15:29:40Z,MEMBER,"What about a DataArray method called `replace_data` or `with_data`? e.g., `data_array.replace_data(new_data)` or `data_array.with_data(new_data)`. We could also make a more general `DataArray.replace` method (inspired by `collections.namedtuple._replace`) that lets you replace any of `data`, `coords`, `dims`, `attrs` or `encoding` on a top object. Then this would look like `data_array.replace(new_data)` or `data_array.replace(attrs=new_attrs)`. Replacing `name` or `dims` could invoke the `rename()` method.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-419472466,https://api.github.com/repos/pydata/xarray/issues/2384,419472466,MDEyOklzc3VlQ29tbWVudDQxOTQ3MjQ2Ng==,4806877,2018-09-07T15:16:47Z,2018-09-07T15:16:47Z,CONTRIBUTOR,"Or what about `xr.DataArray.like` and `xr.Variable.like`? My main worry is that it kind of feels like these should return `bool`s. Another option would be `xr.DataArray.from_dataarray` and `xr.Variable.from_variable`, but that is maybe also confusing...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-419318366,https://api.github.com/repos/pydata/xarray/issues/2384,419318366,MDEyOklzc3VlQ29tbWVudDQxOTMxODM2Ng==,2448579,2018-09-07T04:22:18Z,2018-09-07T04:22:41Z,MEMBER,"LGTM. I'm not a big fan of the name though, but I can't think of a better one. I wonder if we should have `dataarray_like` and `variable_like` that call `_label_like`. Also, this needs additions to `whats-new.rst` and `api.rst`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342 https://github.com/pydata/xarray/pull/2384#issuecomment-419082605,https://api.github.com/repos/pydata/xarray/issues/2384,419082605,MDEyOklzc3VlQ29tbWVudDQxOTA4MjYwNQ==,4806877,2018-09-06T12:55:37Z,2018-09-06T12:55:37Z,CONTRIBUTOR,Any thoughts on this one?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,354324342