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/422#issuecomment-483341164,https://api.github.com/repos/pydata/xarray/issues/422,483341164,MDEyOklzc3VlQ29tbWVudDQ4MzM0MTE2NA==,14314623,2019-04-15T17:18:17Z,2019-04-15T17:18:17Z,CONTRIBUTOR,"Point taken. I am still not thinking general enough :-)
> Are we going to require that the argument to weighted is a DataArray that shares at least one dimension with da?
This sounds good to me.
With regard to the implementation, I thought of orienting myself along the lines of `groupby`, `rolling` or `resample`. Or are there any concerns for this specific method?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,84127296
https://github.com/pydata/xarray/issues/422#issuecomment-482719668,https://api.github.com/repos/pydata/xarray/issues/422,482719668,MDEyOklzc3VlQ29tbWVudDQ4MjcxOTY2OA==,14314623,2019-04-12T20:54:23Z,2019-04-12T20:54:23Z,CONTRIBUTOR,"I have to say that I am still pretty bad at thinking fully object orientented, but is this what we want in general?
A subclass `of xr.DataArray` which gets initialized with a weight array and with some logic for nans then 'knows' about the weight count? Where would I find a good analogue for this sort of organization? In the `rolling` class?
I like the syntax proposed by @jhamman above, but I am wondering what happens in a slightly modified example:
```
>>> da.shape
(72, 10, 15)
>>> da.dims
('time', 'x', 'y')
>>> weights = some_func_of_x(x)
>>> da.weighted(weights).mean(dim=('x', 'y'))
```
I think we should maybe build in a warning that when the `weights` array does not contain both of the average dimensions?
It was mentioned that the functions on `...weighted()`, would have to be mostly rewritten since the logic for a weigthed average and std differs. What other functions should be included (if any)?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,84127296
https://github.com/pydata/xarray/issues/422#issuecomment-481945488,https://api.github.com/repos/pydata/xarray/issues/422,481945488,MDEyOklzc3VlQ29tbWVudDQ4MTk0NTQ4OA==,14314623,2019-04-11T02:55:06Z,2019-04-11T02:55:06Z,CONTRIBUTOR,"Found this issue due to @rabernats [blogpost](https://medium.com/pangeo/supporting-new-xarray-contributors-6c42b12b0811). This is a much requested feature in our working group, and it would be great to build onto it in xgcm aswell.
I would be very keen to help this advance. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,84127296