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-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