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/issues/2891#issuecomment-484142081,https://api.github.com/repos/pydata/xarray/issues/2891,484142081,MDEyOklzc3VlQ29tbWVudDQ4NDE0MjA4MQ==,14000880,2019-04-17T15:34:13Z,2019-04-17T15:34:13Z,NONE,I have just realized that `.copy(deep=True)` is a possible fix for datasets.,"{""total_count"": 2, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 2, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,432798510 https://github.com/pydata/xarray/issues/2891#issuecomment-484138447,https://api.github.com/repos/pydata/xarray/issues/2891,484138447,MDEyOklzc3VlQ29tbWVudDQ4NDEzODQ0Nw==,14000880,2019-04-17T15:25:37Z,2019-04-17T15:25:37Z,NONE,"I am also affected in some code which used to work with earlier versions of xarray. In this case, I call `ds.expand_dims('new_dim')` on some dataset (not DataArray), e.g.: ``` ds = xr.Dataset({'testvar': (['x'], np.zeros(3))}) ds1 = ds.expand_dims('y').copy() ds1.testvar.data.flags C_CONTIGUOUS : True F_CONTIGUOUS : True OWNDATA : False WRITEABLE : False ALIGNED : True WRITEBACKIFCOPY : False UPDATEIFCOPY : False ``` The `.copy()` workaround is not helping in this case, I am not sure how to fix this?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,432798510