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/5644#issuecomment-1561328867,https://api.github.com/repos/pydata/xarray/issues/5644,1561328867,IC_kwDOAMm_X85dD_zj,22245117,2023-05-24T15:02:44Z,2023-05-24T15:02:44Z,CONTRIBUTOR,"> Do you know where the in-place modification is happening? We could just copy there and fix this particular issue.
Not sure, but I'll take a look!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,955043280
https://github.com/pydata/xarray/issues/5644#issuecomment-1557440032,https://api.github.com/repos/pydata/xarray/issues/5644,1557440032,IC_kwDOAMm_X85c1KYg,22245117,2023-05-22T15:35:54Z,2023-05-22T15:35:54Z,CONTRIBUTOR,"Hi!
I was about to open a new issue about this, but looks like it's a known issue and there's a stale PR...
Let me know if I can help to get this fixed!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,955043280
https://github.com/pydata/xarray/issues/5644#issuecomment-888522258,https://api.github.com/repos/pydata/xarray/issues/5644,888522258,IC_kwDOAMm_X8409cYS,8291800,2021-07-28T18:20:49Z,2021-07-28T18:20:49Z,CONTRIBUTOR,"As a temporary workout for my case, I'm just going to do
```python
In [3]: pf = (da.copy(True)).polyfit(""z"", deg=2, w=np.arange(nz))
In [5]: da.max(), da.mean()
Out[5]:
(
array(0.99878237),
array(0.50869358))
```
The thing I don't understand is that `_to_temp_dataset` seems to be trying to do a deep copy (based on the argument names)
https://github.com/pydata/xarray/blob/da99a5664df4f5013c2f6b0e758394bec5e0bc80/xarray/core/dataarray.py#L490-L491
But it is acting like a shallow copy:
```python
In [6]: pf = (da.copy(False)).polyfit(""z"", deg=2, w=np.arange(nz))
In [7]: da.max(), da.mean()
Out[7]:
(
array(8.92217147),
array(2.29014397))
```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,955043280