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/525#issuecomment-483799967,https://api.github.com/repos/pydata/xarray/issues/525,483799967,MDEyOklzc3VlQ29tbWVudDQ4Mzc5OTk2Nw==,221526,2019-04-16T18:54:37Z,2019-04-16T18:54:37Z,CONTRIBUTOR,"@shoyer I agree with that wrapping order. I think I'd also be in favor of starting with an experiment to disable coercing to arrays. @nbren12 The non-communicative multiplication is a consequence of operator dispatch in Python, and the reason why we want `__array_function__` from numpy. Your first example dispatches to `dask.array.__mul__`, which doesn't know anything about pint and doesn't know how to compose its operations because there are no hooks--the pint array just gets coerced to a numpy array. The second goes to `pint.Quantity.__mul__`, which assumes it can wrap the `dask.array` (because it duck typing) and seems to succeed in doing so.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,100295585 https://github.com/pydata/xarray/issues/525#issuecomment-229421229,https://api.github.com/repos/pydata/xarray/issues/525,229421229,MDEyOklzc3VlQ29tbWVudDIyOTQyMTIyOQ==,221526,2016-06-29T17:02:28Z,2016-06-29T17:02:28Z,CONTRIBUTOR,"I agree that custom dtypes is the right solution (and I'll go dig some more there). In the meantime, I'm not sure why you couldn't wrap an xarray `DataArray` in one of pint's `Quantity` instances. With the exception of also wanting units on coordinates, this seems like a straightforward way to get at least some unit functionality. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,100295585