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/5562#issuecomment-873490045,https://api.github.com/repos/pydata/xarray/issues/5562,873490045,MDEyOklzc3VlQ29tbWVudDg3MzQ5MDA0NQ==,2448579,2021-07-04T00:23:46Z,2021-07-04T00:23:46Z,MEMBER,"> I think we should special-case pint and add the units attribute on the DataArray like .pint.dequantify We would also want this to write pint-backed xarray datasets to netCDF.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,935531700 https://github.com/pydata/xarray/issues/5562#issuecomment-873486576,https://api.github.com/repos/pydata/xarray/issues/5562,873486576,MDEyOklzc3VlQ29tbWVudDg3MzQ4NjU3Ng==,2448579,2021-07-03T23:56:54Z,2021-07-03T23:56:54Z,MEMBER,Oh I see. `as_numpy` is using `data.magnitude` and dropping the units. I think we should special-case pint and add the `units` attribute on the DataArray like `.pint.dequantify`,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,935531700 https://github.com/pydata/xarray/issues/5562#issuecomment-873482727,https://api.github.com/repos/pydata/xarray/issues/5562,873482727,MDEyOklzc3VlQ29tbWVudDg3MzQ4MjcyNw==,2448579,2021-07-03T23:12:31Z,2021-07-03T23:12:31Z,MEMBER,wouldn't `as_numpy` on a pint-backed DataArray return a DataArray with numpy data and units in the attribute?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,935531700 https://github.com/pydata/xarray/issues/5562#issuecomment-872966327,https://api.github.com/repos/pydata/xarray/issues/5562,872966327,MDEyOklzc3VlQ29tbWVudDg3Mjk2NjMyNw==,2448579,2021-07-02T12:38:09Z,2021-07-02T12:38:09Z,MEMBER,"> For example for pint the hook would return the result of .pint.dequantify() but it could also be used to explicitly call .get on cupy arrays or .todense on sparse arrays. We discussed `as_numpy` or `to_numpy_data` here: https://github.com/pydata/xarray/issues/3245","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,935531700